Generate PDF from UI action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2022 03:49 AM
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 .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2022 04:00 AM
Hi
Try this share utility:
https://developer.servicenow.com/app.do#!/share/contents/3429377_pdf_generator?v=1.02&t=PRODUCT_DETAILS
-Anurag

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2022 04:13 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2022 04:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2022 04:46 AM
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