Thanks for confirming on this one. Currently it's still fine. For long term goal it would be good to minimize the difference in generating document in different format. When we try to support doc document generation after pdf, we find that we can't reuse much due to the difference.
Posts made by aymanson
-
RE: Recommendation for organizing docx template structure
-
Recommendation for organizing docx template structure
Hi,
I am trying to explore ways to better organize docx templates to cater complicated structure. I tried both childtemplates and component but I feel it doesn't quite compatible with docx templates.Both child templates and components I can only generate text content only. I can't add any styling option. I wonder if docx template only support putting all things in one single document only.
-
RE: Register custom helper for docx template
OK I sorted it out. As it is run in worker with another context, need to parse the loading code as string in the req.template.helpers during beforeRender function for the engine to load it inside the context.
async function beforeRender (req, res) { req.template.helpers = ` const handlebars = require('handlebars'); const HandlebarsIntl = require('handlebars-intl') HandlebarsIntl.registerWith(handlebars) const helpers = require('handlebars-helpers')({ handlebars: handlebars }); `; }
-
Register custom helper for docx template
Hi,
I would like to use some custom helper in the docx but I cant find the documentation on that. I try to register that in beforeRender script but seems within the docx file it doesnt recognize that.
-
RE: Large PDF Generation
Hi, I would like to check again if version 3 address this problem. If it is, I will arrange a test on that.