i’ve made the change as you’ve suggested.

the header works fine now and it is rendered the same as the HTML page header.
the remaining problem is with the footer:
like header, the footer is using a style that set an image for the background and width to 100%, but in the footer case, the image is rendered 1. up-side-down and 2. it is too big (left and right margins of the image are somewhere over the margins of the rendered pdf document); this 2nd. issue is also applyed for the case of the header, even if it is not so visible.

for the html document i’m using
to be able to fit the html text into the pdf document and this is working.

how can i do the same for footer?
private PD4PageMark getPageFooter(String cssTag)
String footerBody = “” + cssTag + “” +

PD4PageMark footer = new PD4PageMark();
footer.setAreaHeight( -1 ); // autocompute
footer.setHtmlTemplate( footerBody );
return footer;

thank you for your help.

one more problem: after i’ve set the page header and footer with pd4ml.setPageHeader and pd4ml.setPageFooter, the header and footer appears only on the first page of the rendered PDF. I don’t understand why header and footer aren’t rendered for all of the pages! How can i make it work?