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
public string Password {get; set;}
get_Password();
set_Password(value);
You can also set the password directly when creating a PDFFile object using the PDFFile(string fileName, string password) constructor.
Some PDF files are encrypted and require a password before they can be used. For these kind of files, you must set the Password property to the correct value before using the other properties and methods of the object. Use IsEncrypted to determine if the PDF file is encrypted and requires a password.
After you set the file name and optional password, you can call the Load method to populate the DocumentProperties and Pages properties of this PDFFile object with the correct values read from the file. Or use any of the other file feature functions supported by this class.
PDF files password must be 64 (defined by the PDFDocument.MaximumPasswordLength constant) or less ASCII characters. LEADTOOLS will automatically truncate and convert to the ASCII the password string if required.
For an example, refer to PDFFile.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2