UI Page: Exporting to PDF does not include images
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2023 10:58 PM
I have designed a UI page that outputs a wide ranging report. This report is supposed to come with graphics however, we have noticed that if we export the page to a PDF, it does not include the graphics.
Is there any way to include graphics in the PDF when you choose to export the UI page?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2023 11:14 PM
Hi @tahnalos ,
wkhtmltopdf is used to export a webpage to PDF. This program requires image to be stored in local and referred by absolute path. Image stored in sys_attachment does not work since it needs to be processed by Attachment processor first .
In short, when using embedded images, make sure:
1) Image is stored in local and referred as absolute path;
2) Do not put it into UI macro or nest in other UI elements (UI page/UI macro, etc).
As this is the limitation of wkhtmltopdf, there is no workaround on this without changing image source.
Make sure the source of the image in the UI page is local and referred by absolute path.
Ex: You can define the image this way on the UI page
<img src="gam.png" width="466" height="262"/>
Note Make sure the path doesn't have the URL to the image. This doesn't work eithe