|
|
•
• Using the Microsoft .NET client assembly, create an EncryptionServiceService object by invoking its default constructor.
• Create a BLOB object by using its constructor.
• Create a System.IO.FileStream object by invoking its constructor and passing a string value that represents the file location of the PDF document to encrypt and the mode in which to open the file.
• Create a byte array that stores the content of the System.IO.FileStream object. You can determine the size of the byte array by getting the System.IO.FileStream object’s Length property.
• Populate the byte array with stream data by invoking the System.IO.FileStream object’s Read method and passing the byte array, the starting position, and the stream length to read.
• Invoke the EncryptionServiceService object’s unlockPDFUsingPassword method and pass the following values:
• The BLOB object that contains file stream data that represents a password-encrypted PDF document.
• A string value that specifies the password value that is used to open the password-encrypted PDF document. This value is specified when encrypting the PDF document with a password.The unlockPDFUsingPassword method returns a BLOB object that you pass to another LiveCycle ES method to perform an operation.Perform a LiveCycle ES operation on the unlocked PDF document to meet your business requirements. For example, assuming that you have a business requirement to apply usage rights to the unlocked PDF document, pass the BLOB object that was returned by the unlockPDFUsingPassword method to the ReaderExtensionsServiceClient object’s applyUsageRights method. For information, see Applying Usage Rights to PDF Documents.
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/sdkHelp/encryptionOpening.74.4.html