←Select platform

Password Property

Summary

Gets or sets the password associated with this PDFFile.

Syntax
C#
VB
C++
public string Password { get; set; } 
Public Property Password As String 
public: 
property String^ Password { 
   String^ get(); 
   void set (    String^ ); 
} 

Property Value

A System.String that contains the password to use when loading this PDFFile object (if the file is encrypted).

Remarks

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.

Example

For an example, refer to PDFFile.

Requirements

Target Platforms

See Also

Reference

PDFFile Class

PDFFile Members

Help Version 20.0.2020.4.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Pdf Assembly