This class represents the protection policy to add to a document for password-based protection. The following example shows how to protect a PDF document with password. In this example, the document will be protected so that someone opening the document with the user password
user_pwd
will not be able to modify the document.
AccessPermission ap = new AccessPermission(); ap.setCanModify(false); StandardProtectionPolicy policy = new StandardProtectionPolicy(owner_pwd, user_pwd, ap); doc.protect(policy);
@author Benoit Guillon (benoit.guillon@snv.jussieu.fr)
@version $Revision: 1.3 $