@andrep07 please go through the available support document to see if this is covered:
Troubleshooting HTML-to-PDF Conversion issues
Please see the answer in the below:
Custom Page Insets and Page Size when using HTMLToPDF
You are on an old Pega release. I believe the functionality was fixed in later versions. You have logged this issue against Pega 7.2.2 I believe there were improvements made in Pega Patch version 8.7.4 where we added support for the A5 page size from the third party lib PD4ml jar which was initially not handled within the engine code.
BUG-720119 was fixed in 8.7.4 where we now use PD4ML jar 4.0.9 fx5.
Please see the Pega Platform 8.7.4 Patch Resolved Issues document and search for ‘pd4ml’:
Therefore in the new version additional page sizes are available for PDF generation - Page size(pyPDFPageSize) can be passed as a param for HTMLToPDF activity . Support has been added for using page sizes in PDF generation which are supported by the v4 pd4ml jar including A0 - A10.
Also note that PDF margins have been made available as parameters. Note that PD4ML v3 used setPageInsets(new Insets(top, left, bottom, right)) , but the new v4 jar uses setPageMargins(new PageMargins(left, top, right, bottom)) .
PD4ML margins are now available to be set as parameters: Param.pyMarginLeft, default value 20 Param.pyMarginTop, default value 10 Param.pyMarginRight, default value 10 Param.pyMarginBottom, default value 10
When standard activities like HTMLToPDF / pyViewAsPDF / pyAttachAsPDF are used, add a Property-Set step before calling the activity to add the necessary margin parameters.
When CreatePDF smart shape is used, set the parameters via the connector of the CreatePDF.
I have not found this to be documented in our documentation.
We encourage our users to provide any feedback on existing articles where you believe details to be missing.
Please could I ask that you open the existing document such as 'Generating complex PDFs from your UI’ or ‘Generating a PDF documentation’ and use the ‘Feedback’ button (see below) to request the level of details you believe to be missing from the main Pega Platform documentation?
Please go through our Resolved Issues documentation as well.