iText 5 PDF Generator deprecation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2022 11:36 AM
Got an email regarding iText5 PDF generator being deprecated and that we need to make sure all references are updated to iText 7. The Rome release notes say, "Starting with the Rome release, itext version 5 is made inactivate. You must manually upgrade to itext version 7."
Sure. Great. How?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2022 12:31 PM
Hi
please find the answer at https://community.servicenow.com/community?id=community_article&sys_id=2e2e69d71bdaa0d038739979b04bc...
Kind regards
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2022 04:31 AM
Well that certainly contains a lot of info about iText 7, but not what my question was about.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2022 05:04 AM
Hi
in my opinion the Support article (see https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0866613) which is referenced by the mentioned article contains everything you need.
There is even an example for which legacy source code you have to replace to use the new API:
- Old PDF generation plugin is used to generate PDF has following syntax -
new GeneralFormAPI (fileName, targetTable, targetTableSysId);
GeneralFormAPI.setDocument(headerImage, footerImage, footnote, headerPosition, footerPosition, pageSize);
GeneralFormAPI.createPDF(body); - Where as new API which can be used from Paris version -
new sn_pdfgeneratorutils.PDFGenerationAPI().convertToPDFWithHeaderFooter(“HTML body”, “TargetTableName”, “TargetSYSID”, “DesiredTargetFileName”,map);
Let me know if you have further questions.
Kind regards
Maik