I have a Word template that I'm populating dynamically with the document merge API.
The goal will be to show images in a table column only if the correspondent element in the array (in the JSON) has the image property. The table is generated programmatically.
What I tried
I've tried adding a condition in the column cell, but it is rendered as plain text. For my understanding, conditions, in dynamically generated tables are not supported 😤
As a workaround, when the element has no image, I link it to a 1px transparent png to prevent the placeholder from showing up. This does the trick. The problem is that the placeholder's size is retained; hence the row doesn't shrink. Is there a way to resize the image programmatically?
I'm probably missing something. It seems absurd there's no solution for this. Can anyone help?