I am a creator — PDF Document Generator - Walter Brame

walter_brame
ServiceNow Employee
ServiceNow Employee

------------------

EDIT

------------------

A lot has changed over the years.

Be sure to check here first:

https://developer.servicenow.com/dev.do#!/reference/api/quebec/server/sn_pdfgeneratorutils-namespace/CellBothAPI?navFilter=pdf

Have also enjoyed repurposing Webkit HTML to PDF plugin:

https://docs.servicenow.com/bundle/geneva-performance-analytics-and-reporting/page/use/performance_analytics/task/t_ActivateWHTP.html

------------------

ORIGINAL

------------------

PDF Document Generator is used by the ServiceNow, Inc. sales organization and is a generic HTML form creation and PDF Document generation framework.   The framework supports creating HTML forms and PDF files using any UI Form in the instance as a template.

 

The PDF Document Generator will replicate how that standard UI Form looks but then provides the functionality to change it easily as a front-end user without requiring development.

 

A PDF feature exists today in the standard platform but it is not customizable. The PDF Document Generator allows for rapid deployment of multiple templates and making changes on the fly to every component visible on the screen very quickly and easily.

 

Previously, the Sales organization was challenged with the ability to produce Quotes and Sales Orders from a CRM environment. With this custom ServiceNow, Inc. app in place, it is now possible for the front-end business users (sales operations, systems managers, administrators, power users, non-developers) to access configuration tools that put control of the following features directly into their hands:

 

- Add/remove fields as needed

- Change any fields placement and the field's label, orientation, or value

- Change any section/grouping or fields / Table of information (E.g. "Section 1", "Section 2", etc.)

- Add/remove new sections present in the form

- Manage an entire section's placement, splits, annotations, and headers

- Re arrange the placement of components in the form (E.g. one component relative to the next)

- Change the look and feel (color, border, padding, alignment, etc.) via common HTML and CSS style attributes.

- A scripting API to create dynamic conditions to change any aspect of the form and data (style, value, label, section, etc.).

- Save templates of form layouts

- Preview and print to PDF

 

The functionality of this PDF Document Generator was made possible by leveraging the ability to write custom scripts in the standard ServiceNow platform, and by having access to the backend table structure and data where forms are stored in the instance (standard UI page, CSS, HTML, and JavaScript).   A single developer, in a time frame of one business quarter, built the PDF Document Generator.

 

pdf_doc_gen_img_1.png

pdf_doc_gen_img_2.png

pdf_doc_gen_img_3.png

pdf_doc_gen_img_4.png

pdf_doc_gen_img_5.png

pdf_doc_gen_img_6.png !

 
99 REPLIES 99

walter_brame
ServiceNow Employee
ServiceNow Employee

Hi Guys,



I uploaded three support files that resolve the issue with roles missing. Also had to tag this version as Dublin only as I was able to see it working with update set version 1.1 with no changes in a new Dublin instance.



The only issue is capturing tables pre dublin so ill add support files for that so it will work pre Dublin.


Walter, do you have an ETA for your addon to support the Calgary release?   Thanks!


Hi Jason,



Finished the Calgary update set.




Calgary Support:

On the Share page I added support file "sys_remote_update_set_a97ef4fd75382100178e0ebe2386e29d" which is the entire application update set for Calgary named "PDF Document Generator - 1.1 (Calgary)".




Tested on a new instance running Calgary, had no errors in the preview of the update set and everything worked first try.




Change Notes (Calgary Vs Dublin):



- Three tables needed to be re built in a Calgary instance. The tables are named "general_element", "general_list", and "u_pdf_document_generator_demo". The tables were originally captured in a Dublin instance and the way tables are created has changed between these two versions of the platform.



- To create the Calgary update set all updates in the original Dublin update set that relate to either of the these three tables were deleted from the original Dublin update set. Then the new tables were created in a Calgary instance in a new update set, and the two update sets were merged.



- This means the Calgary update set is the full application and does not need to be combined with any other updates. If the original Dublin update set was committed it is highly recommended to back that update set out and then commit the new Calgary update set.


Jim Coyne
Kilo Patron

That looks pretty cool - got to find some time to try it out.   Thanks for sharing.


Sanjeev Kumar1
Kilo Sage

Hi,


I have try it But It's not working.


What I did I just download update set from ServiceNow share ( ServiceNow Share )


Uploaded ( on Calgary ).


I have added UI Action ( Preview PDF AND Create PDF ) to Change request table.


When I click on UI Action I did not get any output.


Please suggest me on the same.


Thanks,