Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Chart from reports not printing to PDF

SA-34158

Summary



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.

Error Messages



Not Applicable


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.


Root Cause



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.

Resolution



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.


Suggest Edit

Published April 19, 2018 - Updated October 8, 2020

Did you find this content helpful? Yes No

Have a question? Get answers now.

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

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us