Integrations and Service Exchange
On-screen PDF previews that leave nothing behind
Custom application: transient PDF preview
Zero storage footprint for on-demand PDF previews
The problem
Users required on-demand access to a generated document that organisational policy would not permit to be stored or downloaded.
What we built
- A UI Action calling a Script Include that generates the PDF using PDFGenerationAPI and opens it directly on screen
- The generated file is attached to the record and immediately deleted, so the preview leaves no residue
- A separate flow attaches the PDF to the ROI record permanently, but only once every approval has completed
- Test cases written and executed step by step by the tester, with business process consultant sign-off before release
Issues resolved
- The client wanted pagination reading “Page 1 of 6” and the API will not produce it — the GeneratePageNo parameter emits an integer with no prefix text supported.
- Resolved by defining header and footer as CSS variables and passing them through convertToPDFWithHeaderFooter, the documented customisable page-size method.
- Parameter sequence had to be exact when passing header and footer configuration through the method — the failure mode is silent, which is the expensive kind.
On today’s platform
PDFGenerationAPI ships in the PDF Generation Utilities plugin under the sn_pdfgeneratorutils namespace, active by default. convertToPDFWithHeaderFooter is the customisable page-size method supporting header and footer content. Maximum PDF size is 50 MB.
Outcome
On-demand PDF preview with zero storage footprint, and correctly formatted pagination the API does not provide natively.