I'm thinking about this functionality as well (template to PDF) my planned solution is somewhat similar to Compose to PDF but:
• I already have a platform independent, extendable multiplatform UI system working (let's say an alternative to Compose, nowhere that mature though)
• the JS implementation uses the exact same layout components as the mobile implementations
• it is actually very easy to add a PDF adapter (I have to write a few classes such as text rendering, rectangle rendering etc.)
• I have my own SVG library which is platform independent as well, could be extended with PDF canvas easily
• I already can build complex, reactive UIs in Kotlin
• I already have a proof-of-concept for a UI designer which will let me create no-code UI designs
The main goal of my project is not PDF generation, it will be just a result of the work I've put in on other areas.
I would not say that my project is useful for you as I develop it alone, therefore it probably won't meet the timelines of yours but I think on the long run a well-defined, strict rendering system would worth the effort.
Some references:
•
https://medium.com/@tiz_26128/a-life-without-compose-5b77a9a8129f
•
https://github.com/spxbhuhb/adaptive