You can read an encrypted file with C1PDF by using a password. This topic provides basic information about passwords for a PDF file as well as how to read and write the encrypted PDF files with C1PDF.
PDF File passwords
The PDF file can be encrypted by up to two passwords: and owner and a user password.
The owner password is used to prevent people from doing the following: printing, copying, or modifying text, adding or deleting pages in your PDF file. Once the owner password has been applied you will not be allowed to do the following: printing, content copying, and page extraction.
The user password is used to prevent people from opening or viewing your PDF.
For more information on how to create and write the encrypted file using owner and user passwords see Creating and Writing Encrypted Files.
Creating a Password Protected File
To create a password protected file, use the following code:
In the code above the PDF is saved as encrypted once the following condition is met: Either UserPassword or OwnerPassword is set (by default, neither password is set).
Opening an Existing PDF File
To open an existing PDF file, complete the following:
Loading Password Protected PDF Documents
To load password protected PDF documents use the LoadDocument and LoadProtectedDocument methods like the following: