pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Planow <jpla...@parchment.com>
Subject PDFRenderer Does Not Respect ExportState or ViewState in OCGs?
Date Fri, 20 Jan 2017 00:42:25 GMT
I'm using PDFRenderer.renderImageWithDPI() to create an image from a PDF
with a print watermark. The rendered image includes the watermark text. Is
this expected/desired behavior?

Here are some additional details..

I'm using a 2.1.0 snapshot of PDFBox.

The test PDF (attached) has the watermark text in an Optional Content
Group. The dictionary for this OCG dictionary looks like this:

<</Usage <</Export <</ExportState/OFF>>
           /View   <</ViewState/OFF>>
           /Print  <</Subtype           /Watermark
                     /PrintState        /ON >>>>
           /Type   /OCG
           /Name   (watermark)>>

I've attached the resulting image as well (outputImage.jpg). This doesn't
seem like the correct behavior and I'd be happy to file an issue and look
into it, but I want to be sure this isn't intentional.

With gratitude,
John

--

*JOHN PLANOW *| SOFTWARE DEVELOPER
jplanow@parchment.com
direct 916.367.6868 ext. 1623
3000 Lava Ridge Court, Suite 210, Roseville, CA 95661
*Parchment *| Turn Credentials Into Opportunities
www.parchment.com

Mime
View raw message