To unlock an encrypted PDF document, perform the following steps:
Include project files.
Create an encryption service client.
Get the encrypted PDF document.
Unlock the document.
Perform a LiveCycle operation.
Include project files
Include necessary files into your development
project. If you are creating a client application using Java, include
the necessary JAR files. If you are using web services, make sure
that you include the proxy files.
The following JAR files
must be added to your project’s class path:
adobe-livecycle-client.jar
adobe-usermanager-client.jar
adobe-encryption-client.jar
adobe-utilities.jar (required if LiveCycle is deployed
on JBoss Application Server)
jbossall-client.jar (required if LiveCycle is deployed
on JBoss Application Server)
Create an encryption service client
To programmatically perform
an Encryption service operation, you must create an Encryption service
client. If you are using the Java Encryption Service API, create
an EncrytionServiceClient object. If you are using
the web service Encryption Service API, create an EncryptionServiceService object.
Get the encrypted PDF document
You must obtain an encrypted
PDF document in order to unlock it. If you attempt to unlock a PDF
document that is not encrypted, an exception is thrown.
Unlock the document
To unlock a password-encrypted PDF document,
you require both an encrypted PDF document and a password value
that is used to open a password-encrypted PDF document. This value
is specified when encrypting the PDF document with a password. (See Encrypting PDF Documents with a Password.)
To unlock a certificate-encrypted
PDF document, you require both an encrypted PDF document and the
alias value of the public key that corresponds to the private key
that was used to encrypt the PDF document.
Perform a LiveCycle operation
After an encrypted PDF document
is unlocked, you can perform another service operation on it, such
as applying usage rights to it. This operation belongs to the Reader
Extensions service.