docxChild with images
-
Hello! Can docxChild render child templates that contain images?
-
hi @mmoye
at the moment it only supports text (paragraphs), how complex is your child docx? maybe you can share it and we can take a look at supporting the images
-
Thank you for the quick reply! We are building a sort of photo log with photos rendered via url coming from an outside source. Photos will be both portrait and landscape, have different resolutions/sizes etc. The easiest way to do all this is to pass an orientation variable (boolean) in the data and then include the appropriate child template that contains nothing more than the image placeholder (that way we can use docxImage in the child template and take advantage of usePlaceholderSize, etc.). For example:
{{#each photos}}{{#if landscape}}{{docxChild "landscape_template.docx"}}{{else}}{{docxChild "portrait_template.docx"}}{{/if}}{{/each}}
-
interesting, i have created a new task for this in our backlog, i am not sure when we are going to take a look on it but you can subscribe there for updates
-
Great, thank you! I look forward to any updates on that topic!