Question

15
Replies
6101
Views
HermyR98 Member since 2015 17 posts
Wells Fargo
Posted: June 18, 2015
Last activity: July 18, 2017
Closed
Solved

Setting margins in PDF's.

How can I achieve setting margins in PDF's generated in Pega?

I have a requirement to generate PDF's that can be printed and used in windowed envelopes. I'm using the OOTB Activity HTMLToPDF. Neither this Activity or the Java API it uses (PDFUtils) have any settings for margins.

I have managed to get it to almost work by placing the content in a table and using CSS to apply margins for columns/table rows to approximate side and top margins. This only works if the content fits entirely on one page and isn't long enough to go past the desired bottom margin. Top and bottom margins are not applied to any subsequent pages (as is expected using an HTML table in this way).

***Updated by moderator: Lochan to close post***
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Low-Code App Development
Moderation Team has archived post
Share this page LinkedIn