![]() Today, it is the best choice for encrypting a PDF file because it maintains the confidentiality and integrity of the content. Increasingly, users are exchanging PDF files with encryption to prevent unauthorized access to documents, such as printing/copying/sharing / extracting information about the contents of a PDF file. Save ( dataDir ) Decrypt PDF File using Owner Password RC4x128 ) dataDir = dataDir + "Encrypt_out.pdf" // Save updated PDFĭocument. Encrypt ( "user", "owner", 0, CryptoAlgorithm. GetDataDir_AsposePdf_SecuritySignatures () // Open documentĭocument document = new Document ( dataDir + "Encrypt.pdf" ) // Encrypt PDFĭocument. The following code snippet shows you how to encrypt PDF files. Acrobat will require this password if you want to set/change permissions. Acrobat/Reader will disallow these things based on the permission settings. The Owner password, if set, controls permissions, such as printing, editing, extracting, commenting, etc. ![]() If it’s not correct, the document will not open. Acrobat/Reader will prompt a user to enter the user password. The User password, if set, is what you need to provide in order to open a PDF.Please specify different user and owner passwords while encrypting the PDF file. Finally, save the encrypted PDF file using Save method of the Document object. This enum provides different combinations of encryption algorithms and key sizes. In addition to that, you can pass any value of the CryptoAlgorithm enum. You can pass the user password, owner password, and permissions to the Encrypt method. ![]() You can use the Encrypt method of the Document object to encrypt a PDF file. Using ( Document document = new Document ( dataDir + "input.pdf" )) Encrypt PDF File using Different Encryption Types and Algorithms GetDataDir_AsposePdf_SecuritySignatures () // Load a source PDF file For complete examples and data files, please go to ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |