Chart from reports not printing to PDF
User is embedding a chart control in a section.
User is generating a PDF, that prints the content of the section.
Everything in the section gets printed except the chart. User is using Line chart.
Steps to Reproduce
1) Create a section that includes the chart control.
2) Create an activity that uses HTML to pdf to generate the section.Observe that the chart is not displayed.
Unfortunately, Pega 7.2 does not support this feature.
Report Definition Charts are generated using the 'SWF', a Flash based utility. The activity which is generally used to generate PDFs utilises a tool called 'HTMLTOPDF', which processes standard HTML (and Image) content from which the PDF documents are then created.
As such, the Report Definition Charts are not exportable to PDF via this method, as the functionality to do so is not currently available.
PDF has to be rendered in Browser so that it can be exported to PDF by copying the bytecode from browser. Without the browser, chart cannot be exported to PDF.
For example, Chart does not work in scheduled reports as there is no browser involved but java on the server side.
Export chart to PDF works in case of report browser as the report is first viewed in browser and then the export is triggered, copying the byte code and so on is implemented Out-of-the-box (OOTB).
OOTB “export to pdf” copies the bytecode of the generated chart from browser using a third party library canvg and embeds it into the PDF.
Published April 19, 2018 - Updated October 8, 2020
Was this useful?
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.