You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Arved Sandstrom <Ar...@chebucto.ns.ca> on 2001/02/01 00:21:11 UTC
Re: Non-printable PDFs?
At 04:32 PM 1/31/01 -0500, you wrote:
> Dear FOP developers, I know that there are certain PDFs out
>there that users are not allowed to print to a printer (I have a freely
>available PDF book about EJB that is like this). Is there a way to specify
>a PDF document as non-printable using FOP? If not, is there a quick hack
>that can get the job done? I'd appreciate any input in this matter.
>Sincerely, Daryl. Daryl Beattie
I don't know how quick the hack would be...probably not too bad. What you
want to do is modify the FOP PDF writing code so as to put an Encrypt key
into the trailer dictionary; this key points to an Encryption dictionary. If
using the standard security handler, this dictionary has a key Filter with
value Standard. We don't have to worry about actually encrypting strings &
streams; that's optional, but we want to also supply values for the
Revision, Owner, User, and Permissions keys to the Encryption dictionary.
For someone who opens the doc with a user password, the Permissions apply;
if bit 3 is unset, then the user cannot print.
Ultimately it is the PDF reader program that enforces these permissions,
though. I would guess that such a document could be opened in our
AWTRenderer and then printed, for example.
Regards,
Arved Sandstrom
Fairly Senior Software Type
e-plicity (http://www.e-plicity.com)
Wireless * B2B * J2EE * XML --- Halifax, Nova Scotia
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org