[
https://issues.apache.org/jira/browse/PDFBOX-5765?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tilman Hausherr closed PDFBOX-5765.
-----------------------------------
Resolution: Incomplete
Closing because no files provided.
> 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: [email protected]
For additional commands, e-mail: [email protected]