[ https://issues.apache.org/jira/browse/PDFBOX-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13607720#comment-13607720 ]
Maruan Sahyoun commented on PDFBOX-1176: ---------------------------------------- Well, I omitted the checks for simplicity. This is not production strength but should illustrate a potential approach! if (graphicsStateDictionary == null){ graphicsStateDictionary = new TreeMap(); } There are more checks needed e.g.. page.findResources() could be null .... And, if it's the same watermark on every page, doing an overlay/underlay would be better as the 'object' is then defined only once and reused. Look at the OverlayPDF command line tool to see how this can be done. > Watermark > --------- > > Key: PDFBOX-1176 > URL: https://issues.apache.org/jira/browse/PDFBOX-1176 > Project: PDFBox > Issue Type: Wish > Reporter: Rubesh MX > Labels: Watermark > Original Estimate: 24h > Remaining Estimate: 24h > > I am checking if watermarks can be added to a PDF doc and the same way can > be removed, so far I could not find any option to do that with PDFBox; It > will be better if we have an option to add and remove watermak to a PDF. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira