PDF documents have page break in wrong place
SummaryIt is observed when generating a PDF for a record set, content is getting overridden between pages.
Error MessagesNot Applicable
Steps to Reproduce
- Try to print multiple records on single PDF document, having more then 3 pages.
Root CauseIn 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.
ResolutionPerform 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