[
https://issues.apache.org/jira/browse/PDFBOX-4399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16715250#comment-16715250
]
Stefan Ziel commented on PDFBOX-4399:
-------------------------------------
The javascript as far as it concerns just states some OCG's to true and others
to false and vice versa depending on the button the user clicked.
{code:java}
function lang_de()
{
var aOCGs = this.getOCGs() ;
for (var i = 0 ; i < aOCGs.length ; i++)
{
if (aOCGs[i].name == "de")
{
aOCGs[i].state = true ;
}
if (aOCGs[i].name == "fi")
{
aOCGs[i].state = false ;
}
}
...
}
{code}
The issue is identical to what described by the external links posted by
[~tilman].
> 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: 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]