Hi all,
I'm new to this group, I'm pleased to meet you.
I've a web application from where users can download pdf and I would to
process the document before download to add a watermark.
I think to create a empty 1 page pdf with transparent background and then
place it onto the main document.
This is the java code
public void download(HttpServletRequest request, HttpServletResponse
response) {
//create my empty document on the fly
File f = FopManager.getInstance().transform(...);
PDDocument watermarkDoc = PDDocument.load(f);
PDDocument realDoc = PDDocument.load("maindoc.pdf");
Overlay overlay = new Overlay();
PDDocument resultDoc = overlay.overlay(watermarkDoc, realDoc);
resultDoc.save(response.getOutputStream());
}
All works fine but the transparency I expected. Where I'm wrong?
Thank you
Luca Rasconi
Key Technologies
[email protected]
voice +39029052104
fax +390291390322
www.keytech.it