Apache » Cocoon »

  Cocoon FOP

Cocoon FOP 1.0

PDF Encryption

PDF encryption

FOP supports encryption of PDF output, thanks to Patrick C. Lankswert. This feature is commonly used to prevent unauthorized viewing, printing, editing, copying text from the document and doing annotations. It is also possible to ask the user for a password in order to view the contents.

How to encrypt pdf

First install an encryption provider as described in the fop documentation.

You can configure the FOPSerializer like this (since 2.1.5-dev):

<map:serializer name="fo2pdf" src="org.apache.cocoon.serialization.FOPSerializer" mime-type="application/pdf">
     <parameter name="ownerPassword" value="mypassword"/>
     <parameter name="allowCopyContent" value="FALSE"/>
     <parameter name="allowEditContent" value="FALSE"/>
     <parameter name="allowPrint" value="FALSE"/>
     <parameter name="allowEditAnnotations" value="FALSE"/>
Errors and Improvements? If you see any errors or potential improvements in this document please help us: View, Edit or comment on the latest development version (registration required).