Page 0 support for protected documents in LiveCycle Rights Management ES4

Adobe LiveCycle Rights Management ES4 introduces Page 0 (Wrapper Document) support for Policy protected documents in Adobe LiveCycle ES4 release. In case of most of the non-Adobe PDF viewers, on opening LCRM protected documents a blank screen appears or the application aborts. With Page 0 support, for RM Policy protected PDFs, Cover Page or Page0 is displayed instead of the previewer displaying a blank screen or being completely aborted when viewed in non-Adobe PDF viewers.

When viewing such documents (containing a Page 0) in Adobe Reader/Acrobat or Mobile Reader, the protected Document is opened by default.

Implementation

Processes can be created in Adobe LiveCycle Workbench to implement this functionality using the following Operations:

  1. Protect Document With Cover Page : This operation allows you to secure a given PDF document with the specified policy, and also adds a cover page to the document.
  2. Extract Protected Document : This operation allows you to extract the policy-protected PDF document from the PDF document with cover page

Also, two new APIs have been added in LiveCycle Rights Management ES4 to implement this functionality:

  1. protectDocumentWithCoverPage : This API secures a given PDF with the specified policy, and returns a document with a cover page and the protected document as an attachment.
  2. extractProtectedDocument : This API extracts the protected document which is an attachment in the document with cover page. The document with cover page can be created using protectDocumentWithCoverPage method.

Here is a sample code snippet for protecting a document with a CoverPage using protectDocumentWithCoverPage API:

//Create a ServiceClientFactory instance
ServiceClientFactory factory = ServiceClientFactory.createInstance(connectionProps);

//Create a RightsManagementClient object
RightsManagementClient rightsClient = new RightsManagementClient(factory);

//Reference a PDF document to which a policy is applied
FileInputStream fileInputStream = new FileInputStream("C:\\testFile.pdf");
Document inPDF = new Document(fileInputStream);

//Reference a Cover Page document
FileInputStream coverPageInputStream = new FileInputStream("C:\\CoverPage.pdf");
Document inCoverDoc = new Document(coverPageInputStream);

//Create a Document Manager object
DocumentManager documentManager = rightsClient.getDocumentManager();

//Apply a policy to the PDF document
RMSecureDocumentResult rmSecureDocument = documentManager.protectDocumentWithCoverPage(
inPDF,
"ProtectedPDF.pdf",
"PolicySetName",
"PolicyName",
null,
null,
inCoverDoc,
true);

//Retrieve the policy-protected PDF document
Document protectPDF = rmSecureDocument.getProtectedDoc();

//Save the policy-protected PDF document
File myFile = new File("C:\\PolicyProtectedDoc.pdf");
protectPDF.copyToFile(myFile);

Here is a sample code snippet for extracting the protected document from the document with CoverPage using extractProtectedDocument API:

//Create a ServiceClientFactory instance
ServiceClientFactory factory = ServiceClientFactory.createInstance(connectionProps);

//Create a RightsManagementClient object
RightsManagementClient rightsClient = new RightsManagementClient(factory);

//Reference a protected PDF document with a Cover Page
FileInputStream fileInputStream = new FileInputStream("C:\\policyProtectedDocWithCoverPage.pdf");
Document inPDF = new Document(fileInputStream);

//Create a Document Manager object
DocumentManager documentManager = rightsClient.getDocumentManager();

//Apply a policy to the PDF document
Document extractedDoc = documentManager.extractProtectedDocument(inPDF);

//Save the policy-protected PDF document
File myFile = new File("C:\\PolicyProtectedDoc.pdf");
extractedDoc.copyToFile(myFile);

 

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 9.0/10 (2 votes cast)
Page 0 support for protected documents in LiveCycle Rights Management ES4, 9.0 out of 10 based on 2 ratings
This entry was posted in Adobe LiveCycle ES4 and tagged , . Bookmark the permalink.

Comments are closed.