You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (JIRA)" <ji...@apache.org> on 2019/01/07 19:33:00 UTC

[jira] [Commented] (PDFBOX-4399) Disabled optional content groups are rendered

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

Andreas Lehmkühler commented on PDFBOX-4399:
--------------------------------------------

Sorry for the delay. I had a look and it looks good to me. I'm not sure if it is always a good idea to omit the content if there aren't any properties defining the OCG, but maybe that's simply because I didn't understood every bit of that part of the spec (the clipping stuff etc.) As long as there aren't any regressions we are fine with the current approach.

Maybe one could think about adding that stuff to the text extraction as well to suppress optional text. Does this make sense?


> Disabled optional content groups are rendered
> ---------------------------------------------
>
>                 Key: PDFBOX-4399
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4399
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 2.0.6, 2.0.13
>            Reporter: Stefan Ziel
>            Priority: Major
>              Labels: OCGs
>             Fix For: 2.0.14, 3.0.0 PDFBox
>
>         Attachments: 1822-AGB.pdf, PDFBOX-4399-2.patch, gs.png, original.pdf, printed.png
>
>
> Printing  a Documents with hidden optional content groups [^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: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org