[ 
https://issues.apache.org/jira/browse/PDFBOX-5765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17816454#comment-17816454
 ] 

Andreas Lehmkühler commented on PDFBOX-5765:
--------------------------------------------

Maybe this is all about watermark annotations? BTW, those aren't supported by 
PDFBox

> Not able to add watermark in PDF using Overlay
> ----------------------------------------------
>
>                 Key: PDFBOX-5765
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5765
>             Project: PDFBox
>          Issue Type: Bug
>            Reporter: Tanmay Sharma
>            Priority: Critical
>
> I am trying to add watermark to PDF. I am taking following two files as 
> inputs:
>  # Original PDF file: To which needs to be added.
>  # Watermark PDF File: It is one page PDF which only contains watermark.
> I am trying to combine those files in Overlay to generate new document 
> containing watermark in it.
> {code:java}
> PDDocument watermarkDoc = PDDocument.load(new File(".."));
> //Assuming your empty document with watermark image in it.
>         PDDocument realDoc = PDDocument.load(new File("..."));
>         Overlay overlay = new Overlay();
>         overlay.setInputPDF(realDoc);
>         overlay.setDefaultOverlayPDF(watermarkDoc);
>         PDDocument document = overlay.overlay(new HashMap<Integer, String>());
>         document.save("...")); {code}
> But when I try to open newly generated document in acrobat, though the 
> watermark is displayed in the file, but Acrobat is not able to detect it. 
> That is I am not able to perform any operation like update or delete 
> watermark.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org

Reply via email to