HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › Troubleshooting › body background-color vs. background-image › Re: Re: body background-color vs. background-image
August 25, 2010 at 08:22
#28188
You may define a page background this way:
[language=java:35pxssit]PD4PageMark footer = new PD4PageMark();
footer.setPageBackgroundImageUrl(“http://server/img/background.jpeg”);
pd4ml.setPageFooter(footer);[/language:35pxssit]
It will stretch the image to cover the choosen paper format, so it makes sense to prepare a background image whose aspect ratio is identical to the format.