Generate PDF from UI action

Juhi Jha
Tera Contributor

I have created a UI action which generates a print view which unnecessarly adds mores steps for the client to download pdf i want to download pdf by clicking of the button in the bellow format .

 

13 REPLIES 13

Anurag Tripathi
Mega Patron
Mega Patron

Hi

Try this share utility:

https://developer.servicenow.com/app.do#!/share/contents/3429377_pdf_generator?v=1.02&t=PRODUCT_DETAILS

-Anurag

-Anurag

Mark Roethof
Tera Patron
Tera Patron

Hi there,

Maybe this is an option?

2021-07-12 Fill fields in a PDF using Quebec API "PDFGenerationAPI"

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020, 2021 ServiceNow Community MVP
2020, 2021 ServiceNow Developer MVP

---

LinkedIn
Community article, blog, video list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Vaishnavi Lathk
Mega Sage
Mega Sage

Hello,

Please Check below Link

CUSTOM PDF FILES IN SERVICENOW THROUGH PDFCROWD

Regards,

Vaishnavi

Saurav11
Kilo Patron
Kilo Patron

Hello,

I have created an UI action nd when clicked it directly download tha PDF with out any extra step and just by one click

Please use the below script in Ui action

function exportPDF() {
var sysparm_table = g_form.getTableName();
var sysparm_sys_id = g_form.getUniqueValue().toString();
var link='https://dev11111.service-now.com/';           // Replace with your Instance url
var url = link+sysparm_table + '.do?PDF&sys_id=' + sysparm_sys_id;
g_navigation.openPopup(url);

}

Please mark answer correct/helpful based in impact