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 able to set margin for PDF document



Users are not able to set custom margin for PDF document using HTMLtoPDF.

Error Messages

Not applicable.

Steps to Reproduce

Not applicable.

Root Cause

Expected Behavior.


Here’s the explanation for the reported behavior:

HTMLtoPDF uses PDFUtil api and setting custom margins from this api is not supported.

This can be done using PD4ML API (customizing). 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.

Creating a Border Less, Margin Less PDF :
Setting margins in PDF's:

Published July 28, 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