Retrieves the current user password for the output PDF document.
Parameters
Parameters
Description
user_password
[out] An OdString object that acts as a placeholder for the current PDF document user password.
Remarks
Password protection functionality is supported only for PDF versiond 1.3 and higher.
There are two types of passwords:
User password (Document Open Password) is required to open a PDF document.
Owner password is required to gain full access to the document (owner access). Owner access gives permissions for changing passwords and access permissions for the document.
When a password of at least one of these two types is specified, Publish SDK creates an encrypted output document. The type of encryption depends on the PDF version. The following rules apply for granting access to PDF document content depending on which passwords and access permissions were specified:
When only the user password is set, Adobe® Acrobat® Reader® requires this password to view the document. If the entered password is correct, full access to the document is granted. Access permissions are ignored. Other applications that read PDF documents take the access permissions into account. This means that if the entered user password is correct, the document is opened for viewing (read mode). Other operations can proceed only if the appropriate access permissions are granted.
When only the owner password is specified (the user password is not set), the PDF document can be opened for viewing without entering a password. Other operations are available only if the respective access permissions are granted, and the owner password is required to proceed with any of the allowed operations.
When the owner password is specified and it is not equal to the user password (the user password is also set), the PDF document can be opened for viewing by entering any of the passwords. If the user enters the owner password, full access to the document is granted. If the user enters the user password, other operations are allowed only if the respective access permissions are granted. To proceed with any of these operations, the owner password is required.
When both passwords are equal, full access is granted when the entered password is correct.
The method fills the passed parameter with the current user password and returns it to a calling subroutine.