Images are not displayed in the PDF created by the Generate PDF plugin

Echo1
Tera Contributor

Hi,

After i created an image in db_image table, embed this image in HTML field on the HR document template form.

Then, I created a PDF attachment by generate pdf plugin, but my image is not show in this PDF.

This image can normally show on portal, only it is not show in pdf.

But I can use previous image to show in the PDF.

 

I want to know why my image doesn't show in PDF? But I use other image can normally show, and my image can normally show on portal.

 

And how can I solve this problem.

 

6 REPLIES 6

Tom Sienkiewicz
Mega Sage

Have not checked exactly, but perhaps this Generate PDF API only supports images added as attachments, not as image library? Have you checked with an example where img src="/sys_attachment[...]"?

img src="/sys_attachment[...]"? ---> this format can be shown in PDF.

but i can use other images form ui image library. when i created and uploaded a new image, i can't use it .

Fabian Kunzke
Kilo Sage
Kilo Sage

Hey,

what fixed it for me (in both cases - as attachment as well as from the library) was exluding the "/" from the source parameter:

This works:

<img src="sys_attachment.do?sys_id=eb36ddf81b1d511005fdc803604bcb0e" alt="barcode.png" width="375" height="134" />
<img src="0214ADAF-1C76-4E34-966F-0EBD09534402.pngx" alt="" width="300" height="450" />

This does not:

<img src="/sys_attachment.do?sys_id=eb36ddf81b1d511005fdc803604bcb0e" alt="barcode.png" width="375" height="134" />

When choosing an image from the library, it always worked, when i chose it from the popup window:

find_real_file.png

When clicking on the search icon, this opens a list of all images on the instance. Selecting one fromm there generates the source url, which sees to work consistent.

Hope this helps.
Regards

Fabian

Hello @Fabian Kunzke ,
Thanks for providing the workaround for the above issue. It did worked in our case too.

However is there permanent fix for this issue? Why we see "/sys_attachment" instead of "sys_attachment"? Could you please help me here?
Thanks in advance