[✅ Solution] Showing attached Image Field content inside PDF - Mutiple images

Hello community…

I was searching here and couldnt find the answer, or it is a really simple and silly config I couldnt get yet, but I need to show the images attached into an Image Field inside the PDF content.

I tried to add Image and @ refer to the image field, but It didnt render the image so far…

Also tried some “vibe code” alternatives that AI told me to, but also no success…

If there are any similar using cases the community might have been passed through, I’m very interested on how you guys did to address this simple situation… :slight_smile:

1 Like

Hi @toni,
I once got stuck at the same point and if I understand your problem here, you should try:
Insert image and use @image_field_URL

See this post here when I was trying to add QR code from image field to PDF.

Hope this helps.

1 Like

Hello @tomaz, thank you for your insight…

Indeed, one of my trials was using the image feature and referencing the field, or the field’s URL.

But it didnt render the images (more then one in the same field):

It looks like the related post brings a good solution for when you have the image rendered into a calculation field.

I even tried to workaround using a calculation field based on this post but it looks like the image field is not allowed to reference inside a calculation field.

@toni I have tried it with the same example as it was described before with one image inside image field and it works.
one image on record


BUT if I add another image to to the record, there are no images on PDFs
two_images_one_record

So I see now what your problem is.
Honestly I have never used more than one image on PDF.
Maybe a workaround is to add more image fields and add them one by one, but definitly not a long term solution.
Maybe a bug needs to be reported or maybe that us two just do not know how to more images to PDF.

Sorry I couldn’t be more helpful here.

@toni as @tomaz says and i believe you have found out if you add multiple images to a single field then the @ variable in the image embed will break this is because the image embed takes the url it is given and wraps it in the html required to show the image and now you are passing it multiple urls the html messes up. The only solution to this (that I can think of) is to build the html yourself and drop it in. Now there is obviously multiple ways to do this but:

const ev = `$join($.('<img src="' & view_url & '" style="max-width:50%; display:block; margin-bottom:1rem;">'))`
var_images = jsonata(ev).evaluate(image_to_pdf_field_multi_image_iterable);

does the trick and should be transferable to your app just change image_to_pdf_field_multi_image_iterable to the one that matches your field name:
CleanShot 2025-12-12 at 08.29.50

4 Likes

Thank you Jason, again, for solving this out!

What I thought strange is that even a single image record was not printing the image in the tests I was trying.

But this code did the trick.

@toni I’m glad it’s working for you. You’ve raised a point that’s worth explaining though. Even if it wasn’t the issue with your single image, it’s still important.

When you add a single image using the method I mentioned in the earlier post to Tomaz, and the way he’s shown above, the image will only appear during a simulation or an actual creation. This can be confusing because while you’re editing the PDF layout, there’s no indication that anything is there: it just looks like white space.

This makes it easy to think nothing is happening. There is a logical reason for this behaviour, but it doesn’t change the fact that it can look like it isn’t working.

3 Likes

Yes Jason, indeed, in the editing engine it doesnt show, but it is as it is in all variables inside a PDF.

In the other platform it happens the same when edditing, but we can simply add the reference to the image field and the image loads…

The thing here is that by selecting an image field inside Tape, it will bring the field value (the file names), not the image rendered at the PDF.

Anyways, your solution looks like the best way the deal with image fields inside PDFs, single or multiple file.

1 Like