PDF Conversion is usually handled server-side and semi-asynchronously b/c it has a large number of dependencies on fonts and other factors to produce consistently rendered pages.
My usual approach is to write an event action to handle it on the FileNet side where you'd commit the HTML as is to FileNet and use an Event Subscription to do the file conversion and store the PDF as version 2 of the same document. Then on future retrievals you request current version and get back the PDF. You can then use retention policies and a deletion sweep to clean up the html versions if desired.
While you can embed the PDF Convert logic using pdfbox or itext or any other java compatible library in the event action code module, I usually find performance benefits from externalizing this function to a separate microservice that is invoked by the event action logic.
Alternatively Content Navigator and Daeja ViewONE, included with the product, also have built-in capabilities to do PDF Conversion, both use server-side logic to do it and put up a progress bar when done interactively from the UI, because it can be slow. Both services are using OutsideIn and PDFBox to do it.
------------------------------
Eric Walk
Director
O: 617-453-9983 | NASDAQ: PRFT | Perficient.com
------------------------------
Original Message:
Sent: Thu November 10, 2022 01:21 PM
From: Chakradhar Simhadri
Subject: HTML to PDF Conversion and store the pdf in FileNet.
Requirement: send the data from coach to the html code and prepare a templet and convert the html code with data to "PDF" file (.pdf extension) and convert(encode) the PDF file into "Base 64" and create a document and store it in the FileNet.
I am stuck at the conversion of html code to pdf. Need help.
Thank you in advance.
------------------------------
Chakradhar Simhadri
------------------------------