Reader extending document security policy-protected PDF documents

The policy-protected documents are encrypted documents. You cannot use standard reader-extension APIs to apply, remove, and retrieve usage rights of a policy-protected PDF documents. Only Reader Extensions service of Portable Protection Library provides APIs to apply, remove, and retrieve usage rights of a document security policy-protected PDF documents.

Reader Extensions service

The reader extension service adds usage rights to a policy-protected PDF document, activating features that are not normaly available when a PDF document is opened using Adobe Acrobat Reader. It also has APIs to remove and retrieve usage rights of a policy-protected document.

The Reader Extensions service fully supports PDF documents based on PDF standard 1.6 and later. Apart from Acrobat Reader, third-party users do not require any additional software or plug-ins to use the policy-protected PDF documents.

You can accomplish the following tasks with the Reader Extensions service:

  • Apply usage rights to a policy-protected PDF document.
  • Remove usage rights of a policy-protected PDF document.
  • Retrieve usage rights applied to a policy-protected PDF document.

Apply usage rights to a document security policy-protected PDF document

You can use the applyUsageRightsJava API to apply usage rights to policy-protected PDF documents. Usage rights pertain to functionality that is available by default in Acrobat but not in Adobe Reader, such as the ability to add comments to a form or to fill in form fields and save the form. PDF documents that have usage rights applied to them are called rights-enabled documents. A user who opens a rights-enabled document in Adobe Reader can perform operations that are enabled for that specific document.

Syntax: InputStream applyUsageRights(InputStream inputFile, File certFile, String credentialPassword, UsageRights usageRights)

ParameterDescription
inputFileSpecify InputStream that represents the PDF document to which usage rights are to be applied. You can use LiveCycle Rights Management or AEM Forms document security protected documents.
certFileSpecify File object that represents a .jks file. The .jks file is a keystore file. It points to a certificate that grants usage rights.
credentialPasswordSpecify password of the keystore.
usageRightsSpecifies an object of type UsageRights. The usageRights object represents individual rights that can be applied to a policy-protected PDF document.