Take a survey

Section A - DDX User Guide > Working with Secured Documents > Specifying passwords

Specifying passwords
When creating a document using the Assembler service, you can specify passwords that are required to access the document. PDF supports two types of passwords: a master password and an open password.
A master password (also called an owner password or permissions password) controls the ability to change the permissions on a document. When you specify a master password, you can specify permissions that restrict the operations users can perform, such as the ability to print a document, make changes to its content, and extract contents.
When opening a document that is encrypted with a master password, the following rules are applied:
A user providing a master password is considered the owner of the document and has the ability to change the permissions. Supplying the master password means your actions are not limited by the permission settings in the document.
A user can open the document without supplying a password if the document does not also have an open password, but the user’s actions are limited by the permission settings. The user cannot change the permissions.
An open password (also called a user password or document open password) controls the ability to open a document. If this password is set for a document, a user is required to provide the password in order to open the document:
In DDX, you specify password encryption for a document by setting the encryption attribute of the PDF result element. The value of this attribute must match the name attribute of a PasswordEncryptionProfile element, which provides the encryption information.
Note: You can also specify encryption when disassembling a document using the PDFsFromBookmarks element. See Disassembling PDF documents.
In this example, the PasswordEncryptionProfile element whose name attribute is "userProtect" specifies an open password that is used to encrypt the PDF result document doc2.
Example: Encrypting a document with an open password
<PDF result="doc2" encryption="userProtect">
	<PDF source="doc"/>
</PDF>
 
<PasswordEncryptionProfile name="userProtect">
	<OpenPassword>opensesame</OpenPassword>
</PasswordEncryptionProfile>
If you specify None for the encryption attribute of the PDF result element, the document is not encrypted, regardless of whether or not the base source document was encrypted. If you do not specify a value for encryption, the result will be encrypted with the same settings as the base document, as long as you did not specify a full save for the document (see Saving PDF documents).
A PasswordEncryptionProfile element must be at the root of the DDX document; that is, it must be a child of the DDX element. A DDX document can contain any number of PasswordEncryptionProfile elements. More than one PDF result element can refer to the same PasswordEncryptionProfile element.
The PasswordEncryptionProfile element has two additional attributes that you may want to set:
compatibilityLevel specifies backward compatibility with previous PDF versions. A value of Acrobat3 uses 40-bit RC4 encryption. Acrobat5 and later use 128-bit RC4 encryption. Acrobat6 allows metadata to be unencrypted in an encrypted document and Acrobat7 allows file attachments only to be encrypted (see encryptionLevel below).
encryptionLevel allows you to do selective encryption on the document and depends on the value of compatibilityLevel. The default value, All, means that the entire document is encrypted. NotMetadata means that the document metadata remains unencrypted while the rest of the document is encrypted. OnlyFileAttachments means that the file attachments are encrypted while the rest of the document is unencrypted.
You specify the permission settings associated with the document by using the Permissions element. Its child element MasterPassword specifies the master password. The attributes copy, edit, print, and screenReading specify different categories of permissions and are available only when compatibilityLevel is Acrobat5 or greater. (See Permissions.)
The following example specifies both an open and master password. The permissions indicate that the document cannot be printed and copying of content is not allowed, but users can fill in forms and add comments and digital signatures.
Example: Specifying an open and master password
<PDF result="doc" encryption="limit">
	<PDF source="doc1"/>
</PDF>
 
<PasswordEncryptionProfile name="limit"
	<OpenPassword>opensesame</OpenPassword>
	<Permissions print="No" edit="CommentsFormFillinSign" copy="No">
		<MasterPassword>docmaster</MasterPassword>
	</Permissions>
</PasswordEncryptionProfile>
This example encrypts a document and sets permissions but leaves the document metadata unencrypted.
Example: Encrypting a document and leaving metadata unencrypted
<PDF result="doc2.pdf" encryption="limit">
	<PDF source="doc1.pdf">
</PDF>
<PasswordEncryptionProfile name="limit" compatibilityLevel="Acrobat6" 
		encryptionLevel="NotMetadata">
	<Permissions print="No" edit="CommentsFormFillinSign" copy="No">
		< MasterPassword>letmein</MasterPassword>
	</Permissions>
</PasswordEncryptionProfile>

Section A - DDX User Guide > Working with Secured Documents > Specifying passwords

Document Description XML (DDX) Help
LiveCycle ES Update 1

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/livecycle/8.2/ddxRef/000706.html