Support Article

PDF documents have page break in wrong place



It is observed when generating a PDF for a record set, content is getting overridden between pages.

Error Messages

Not Applicable

Steps to Reproduce

  1. Try to print multiple records on single PDF document, having more then 3 pages.

Root Cause

In Pega, PDF parsing are done through a third-party product PD4ML APIs’. Currently Pega 6.2sp2, uses PD4ML Version::380 DMS library and latest Pega 7 PD4ML Version is 390 Pro DMS library.
According to PD4ML codebook, In versions v380-v385, PDF parser of PD4ML has a number of limitations: it cannot parse linage and formatting of PDF byte code.


Perform the following local-change:

In which instead of passing whole HTML markup code for all the records to generate a single PDF byte code, a split and merge concept can be applied.
In this approach content of each record needs to be converted from HTML Markup code to PDF byte code and merge all those PDF byte code corresponding to each PDF pages to generate a single file.
Make sure that content of each record is within the page limit and if required needs to be adjust by splitting further.
Here is the code implementation, where step 6 should be iterated to capture each record individually:

Published March 6, 2017 - Updated March 9, 2017

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.