0
Conditionally show/hide images in table
New Here
,
/t5/acrobat-services-api-discussions/conditionally-show-hide-images-in-table/td-p/13180140
Sep 05, 2022
Sep 05, 2022
Copy link to clipboard
Copied
Goal
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?
Thanks
TOPICS
Document Generation API
,
REST APIs
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Have something to add?
Join the conversation

