How to add image dynamically in pdf

Shivam7
Tera Contributor

How to dynamically add images through script or pdf mapping.

3 REPLIES 3

Harneet Sital
Mega Sage
Mega Sage

Hi Shivam, 

This can be done using a custom PDF generation API and you can use the attachment sys_id in the PDF which can be dynamic based on conditions you want to add. The below article explains this in detail - 

https://community.servicenow.com/community?id=community_article&sys_id=2e2e69d71bdaa0d038739979b04bc...

 

If it is something else that you are trying to achieve, add the details here and we can take it from there.  

 

Thanks
-Harneet Sital (ServiceNow Certified Technical Architect)
Request you to please mark my answer as helpful or correct based on the impact

Find all my ServiceNow articles here

Hi Harneet,

Thanks for the reply, it was quite enlightening to go through that API.

but

my problem is a bit different, already a pdf has been generated through the HR PDF Template and there are some fields that are dynamically mapped with the help of  PDF Template Mapping. So this pdf is signed by the subject person(mapping is done via pdf template mapping through a "mark a signature" button) via a task, after this signed document is attached to the hr case I try to regenerate that pdf via hr_PdfUtils().prefillPdfTemplate, while regenerating that pdf the signature vanishes.

 

vartulagarwal
Tera Contributor

@Shivam7 - Wanted to check if you found a way to fill in some fields of PDF after the first signature is done?