[
https://issues.apache.org/jira/browse/PDFBOX-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13607704#comment-13607704
]
MH edited comment on PDFBOX-1176 at 3/20/13 3:31 PM:
-----------------------------------------------------
This leads to a NullPointerException at
graphicsStateDictionary.put("TransparentState", extendedGraphicsState);
because resources.getGraphicsStates(); returns null! I worked around this via
Map graphicsStateDictionary =
resources.getGraphicsStates(); //returns null !!!
if (graphicsStateDictionary != null) {
graphicsStateDictionary.put("TransparentState",
extendedGraphicsState);
resources.setGraphicsStates(graphicsStateDictionary);
} else {
Map<String, PDExtendedGraphicsState> m = new
HashMap<>();
m.put("TransparentState",
extendedGraphicsState);
resources.setGraphicsStates(m);
}
and this seems to work: the text is drawn "behind" - but still in color black -
cs.setStrokingColor(Color.RED) does nothing!
was (Author: mhilpert):
This leads to a NullPointerException at
graphicsStateDictionary.put("TransparentState", extendedGraphicsState);
because resources.getGraphicsStates(); returns null!
> 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