Question
Booz Allen Hamilton
US
Last activity: 23 Dec 2022 0:22 EST
HtmlToPdf activity doesn't format the same after upgrade from 8.1.8 to 8.6.4
Our application generates both Word document and also PDFs. We apply custom colors, fonts, and formatting. Previously in Pega version 8.1.8, the PDFs would generate without any issue. Since the upgrade, we have found that the PDF output hs shifted to the right (even off the page so the words are invisible).
Our application generates both Word document and also PDFs. We apply custom colors, fonts, and formatting. Previously in Pega version 8.1.8, the PDFs would generate without any issue. Since the upgrade, we have found that the PDF output hs shifted to the right (even off the page so the words are invisible).
It appears that the activity HtmlToPdf activity changed from Pega-IntegrationArchitect:08-01-01 to Pega-IntegrationArchitect:08-04-01 and the 08-04-01 version doesn't require as many parameters.
Our code generates an HTML document with included HTML files Sample code below:
<pega:include name="MemoStyles" type="Rule-Obj-HTML"/>
<pega:include name="MemoHeader" type="Rule-Obj-HTML"/>
<div class="RMFMemo-body">
<!--
<div style='margin-left:-0.5in; margin-right:1.0in'>
-->
<div class="RMFMemo-right-align">
<p><p:r n=".pyTextValue(1)"/></p>
</div>
...
Once the HTML is generated, we then call the HtmlToPdf activity. The output that is generated is shifted. I can bring the document back by adding the commented out code above (margin left -0.5 in and margin right 1.0 in).
Question 1: Does the new HtmlToPdf version support rendering the two Rule-Obj-HTML objects into the PDF?
Question 2: Can this be configured to work without modifying the underlying HTML code? If yes, then what am I missing?
NOTE: I have tried setting the Param.UseCompactStylesforPDF to true, but that didn't seem to work.
Thanks in advance for your help / feedback,
Mike

@MichaelB9860
The HTMLToPDF activity has a markup parameter for that we need to pass html fragment rule ( simply html file) and provide the PDF file name and execute it . It will generate the PDF. Coming to the param UseCompactStylesForPDF if this is true the styles will be picked from pyCompactStylesForPDF css file. If this is false then the styles will be coming from skin. As per Pega recommendation we have to set the param to true and not to pass skin file.
The html objects should not have separate html body tags . From 8.1.8 to 8.6.4 the PD4ML jar version is changed. Markup parameter which will be present in HTMLToPDF activity is the key parameter we can identify where the issue is coming.