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

Stefan Ziel commented on PDFBOX-4399:
-------------------------------------

Most of the needed Infrastructure already exists. 
org.apache.pdfbox.pdmodel.graphics.optionalcontent.PDOptionalContentProperties.isGroupEnabled(String)
  already executes steps 2. to 5.
org.apache.pdfbox.text.PDFMarkedContentExtractor already tracks the content 
groups.

So the patch contains 
# move some code from org.apache.pdfbox.text.PDFMarkedContentExtractor to 
org.apache.pdfbox.contentstream.PDFStreamEngine
# org.apache.pdfbox.pdmodel.graphics.optionalcontent.PDOptionalContentGroup 
executing step 1.
# org.apache.pdfbox.rendering.PageDrawer finally controling the visibility.

> Printing invisible Content from PDF-Forms 
> ------------------------------------------
>
>                 Key: PDFBOX-4399
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4399
>             Project: PDFBox
>          Issue Type: Bug
>          Components: AcroForm, Rendering
>    Affects Versions: 2.0.6, 2.0.13
>            Reporter: Stefan Ziel
>            Priority: Major
>              Labels: OCGs
>         Attachments: PDFBOX-4399.patch, gs.png, original.pdf, printed.png
>
>
> Printing PDF-documents with macro [^original.pdf] renders hidden content  
> [^printed.png]  . Code used to print
> {code:java}
> InputStream sourceStream = new FileInputStream(pFile);
> try {
>   PDDocument source = PDDocument.load(sourceStream);
>   job.setPageable(new PDFPageable(source));
>   job.print(atts);
> } finally {
>   sourceStream.close();
> }
> {code}
> This is not only a problem of PDFBox ;) but can be done right ... ghostscript 
> does it [^gs.png].



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to