Adobe PDF Library honors any document security found in an input PDF document. If the document is password-protected, the application will need to provide the correct Owner or User password required to open it. If the document is opened with the Owner password, the application can clear the security restrictions if necessary in order to perform operations on that document, but if the document is opened with the User password, the application will be limited to operations that are allowed for the PDF document in that document’s security settings.
The Decryption sample program demonstrates the process of opening a password-protected file, and the DLI sample Encrypt application demonstrates how to create a password-protected file. Also consider these sample programs in the Adobe PDF Library:
The Adobe PDF Library sample application SnippetRunner lets you experiment with different security manipulation APIs, to determine the operations your application will need to perform on your PDF documents during processing.