We are creating a (multipage) pdf document using a html stream as content and a small one to be used as footer (corr-set-stream to pyPDFFooterHTMLTemplate).
When the PDF is generated using HTMLToPDF, we see the footer on the first page is significantly higher than the footer on the other pages. Is there a way to force the footers on all pages to be on the same spot?
We’ve tried adding a pd4ml:footer tag on both the footer correspondence rule as by adding the footer to the main content surrounded by pd4ml:footer-tags, but neither give a good result.
Looking forward to your feedback.
Hello @Joris_Claus
Based on what i noticed recently, I have got consistence content rendered in both footer and header of the PDF in all pages.
What is pega version you are using?
Are you wrapping up the content generated in the header or footer with any additional HTML content or styling ?
Rather using pd4ml:footer tags use a simple div without any styling and see how it behaves.
Want to hear more on this..
Regards
JC
The footer is a simple html contained in a div of class “footer”.
div class=“footer”
table
tr
td style=“vertical-align: bottom;”
some text
/td
td
img src=“webwb/SomeImage.png” style="width: 2.5cm; "
/td
/tr
/table
div
I had a css included in my body html having a smaller font-size on footer class which was picked up, so working fine.
Pega version is 24.2.3
As I read sometimes skin may cause issues, I’m now trying to set the UseCompactStylesforPDF to true and have my css in a sybling of pyCompactStylesforPDF.css, but this is not working currently. I suspect because of cache issues as this css is included as pega:static.
Ok! I got the pyCompactStylesforPDF.css working. It was due to the fact that I removed all styling from my corr-rules and HTMLToPDF looks for at least one <link type=”Stylesheet” ….> tag to swap in the pyCompactStylesforPDF.css, so as I removed everything, the compact styles weren’t swapped in ….
One of my colleagues found out the table was causing this weird behaviour. I’ve replaced the table tags with a flexbox solution and now everything is working as expected.
1 Like