Page 1 of 1

Watermarking on Docx and Pdf file

PostPosted: Mon Jun 22, 2015 4:41 pm
by resh
Could anyone suggest any method to insert watermark in docx as well as pdf using Docx4j?

Any help will be deeply appreciated.

Re: Watermarking on Docx and Pdf file

PostPosted: Mon Jun 22, 2015 9:18 pm
by jason
Image or text?

The real issue is finding a docx to PDF converter which supports it.

The XSL FO based converter built into docx4j doesn't, though you may be able to add support which converts a watermark image to fo:region-body/@background-image easily enough; see further pdf-output-f27/watermark-w-pict-v-shape-v-imagedata-t2168.html

A text based watermark would need to be handled differently.

OpenOffice? See http://ask.libreoffice.org/en/question/ ... cedev-444/

Re: Watermarking on Docx and Pdf file

PostPosted: Mon Jun 22, 2015 11:33 pm
by resh
Thanks for the quick reply!!
we are generating the Docx and pdf file from an html page. we are converting this html file to FO, so that we don't have any direct control to the FO . So it would be great if you could give me corresponding change that should be made to the html page to get the desired output.
Thank you