Background image on document template

1
In one of our applications we generate pdf's documents for confirmations and vouchers through document template definitions. Now the client wants to get rid of their pre-printed printpaper and want to generate their reports including background/watermarks. Question is; is it possible to define a background(image) on a document template (pdf)? If not, are their other ways to achieve the desired result. I already tried using the style properties, but that doesn't seem to work.
asked
3 answers
1

You can use document style (custom style):

background-image:'file:///C:\Users\Public\Pictures\Sample Pictures\Chrysanthemum.jpg'

answered
1

The best way to do this is by superimpose / overlay the document generated by Mendix with an other PDF containing the back-ground or watermark. Using a background-image is not a good choice because of backgrounds, like watermarks and logo's, are usually saved in (PDF) vector format. Using images will increase document size and will decrease quality.

This can easily be done with Java by using Apache PDFBox or IText (http://pdfbox.apache.org/commandlineutilities/Overlay.html). We've implemented this several times and we will apply a PDFTools to the app store soon containing for instance this function.

answered
0

Thanks, this works partly, but not as desired. I defined the style setting at the document level but the background is applied to the header, body and footer separately and not to the whole document at once. Furthermore the areas between the mentioned report sections and also the defined margins are still blanc.

Is there another solution to solve these issues also?

answered