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

Peter Pinnau commented on PDFBOX-3316:
--------------------------------------

Is there a way to read such comments with PDFBox? I tried the PDFStreamParser 
but it seems to ignore % comments since they are not tokens.

I am searching for the possibility to identify content content streams which 
contain a certain comment and remove that streams from the document.


> Add comment to PDF
> ------------------
>
>                 Key: PDFBOX-3316
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3316
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Rendering
>    Affects Versions: 2.0.0, 2.0.1, 2.0.2, 3.0.0
>            Reporter: Jerrol Etheredge
>            Assignee: Tilman Hausherr
>            Priority: Minor
>             Fix For: 2.0.2, 3.0.0
>
>
> For our application we use some comment texts (prepended by a %) to mark 
> content and perform text replacement.
> We currently use the appendRawCommands() method to add these, but since this 
> method has been marked as deprecated since version 2.0.
> Would it be possible to add some like a addComment() method to 
> PDPageContentStream?
> The code would probably be something trivial like:
> public void addComment(String comment) {
>     output.write("%" + comment + "\n");
> }



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to