Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.3.23
|
Leadtools.Pdf Assembly > Leadtools.Pdf Namespace > PDFFile Class : Password Property |
public string Password {get; set;}
'Declaration
Public Property Password As String
'Usage
Dim instance As PDFFile Dim value As String instance.Password = value value = instance.Password
You can also set the password directly when creating a PDFFile object by calling the PDFFile(string fileName, string password) constructor.
Some PDF files are encrypted and require a password before they can be used. Encrypted files must have the Password property set to the correct value before using the other properties and methods of the object. Use IsEncrypted to determine whether the PDF file is encrypted and requires a password.
After setting the filename (and optional password), call the Load method to populate the PDFFile object's DocumentProperties and Pages properties with the correct values. Or use any of the other file feature functions supported by this class.
PDF file passwords can be no more than 64 ASCII characters. LEADTOOLS will automatically truncate and convert the password string to ASCII if necessary. Set the maximum password length by setting the PDFDocument.MaximumPasswordLength constant.
For an example, refer to PDFFile.