Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: Java
Expertise: Advanced
Jan 2, 2007



Application Security Testing: An Integral Part of DevOps

Obtain a Secure PDF from an FOP Processor

This tip shows you how to obtain a secure PDF from an FOP processor. This means the user can't open the PDF without a user password and, once downloaded, cannot edit, print, or copy the PDF.

//get an org.apache.fop.apps.Driver object
Driver fop=new Driver();
//the output will be a PDF file
//create a java.util.Map
java.util.Map M=new java.util.HashMap();
M.put("userPassword", "airwingscrush");
M.put("allowCopyContent", "FALSE");
M.put("allowEditContent", "FALSE");
M.put("allowPrint", "FALSE");

//set the constrains
Leonard Anghel
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date