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

Not being able to set distance from edge of page to html element

SA-25716

Summary



Not being able to set distance from edge of a page to a html element, that is header, footer, or side borders.

ERROR MESSAGE

Not applicable.

Steps to Reproduce



1. Create a HTML Section.
2. Pass the created html section to HTMLTOPDF activity.
3. Observe the generated document. 

Root Cause



Not applicable.

Resolution



Here’s the explanation for the reported behavior:

Pega provides Activities for generating PDFs from HTML streams. The Activities HTMLToPDF and Code-Pega-PDF.View are used to generate convert any HTML stream to PDF (HTMLToPDF) and send the PDF back to the browser (Code-Pega-PDF.View)

Some of the limitations include:
1.    Organizations often have headers and footers which must be included on PDF documents rendered. These however, are not included on the UI generated for the application.
2.    The data displayed on the PDF may have additional formatting requirements like:
       a.    Spacing or font requirements
       b.   Colour schema
3.    The data displayed on the PDF may have additional or different visibility restrictions.

To overcome these in a Pega application, there are two options available:
1.    Use an open source library like iText for PDF generation. This will allow the system architect to have more granular control over the PDF formatting.
2.    Leverage the PD4ML API for configuring the formatting requirements.

Leveraging the PD4ML API is the preferred option with Pega as it provides a higher level of abstraction which is easier to work with.

Additionally, this is a licensed product bundled with the base Pega product and therefore has better support available.

Published July 26, 2016 - 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.

Did you find this content helpful?

Want to help us improve this content?

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