pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tilman Hausherr (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PDFBOX-4399) Disabled optional content groups are rendered
Date Sat, 15 Dec 2018 12:44:00 GMT

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

Tilman Hausherr commented on PDFBOX-4399:
-----------------------------------------

[~jjcool] thank you; I noticed that you make the assumption than rendering to graphics = print.
This is wrong, see the demo code in PDFBOX-3359. So there should be a different way to pass
this. The simplest way that comes into my mind is to set it like {{subsamplingAllowed}}. The
default should be EXPORT. So PDFPrintable should also be changed so that it passes PRINT.
Could you please change that and resubmit?

[~lehmi] does the code look like Stefan used your advice from 2016? Which was
{quote}We need to track the current layer and the stack of all current layers. C. provided
some code doing that and we already have some code doing it (I'm talking about the operators
in org.apache.pdfbox.contentstream.operator.markedcontent). What is missing is some sort of
filter based on that information.{quote}


> 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
>         Attachments: PDFBOX-4399.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


Mime
View raw message