Leadtools.Forms.DocumentReaders Namespace > DocumentReaderLoadOptions Class : GetPasswordCallback Property |
public DocumentReaderGetPasswordCallback GetPasswordCallback {get; set;}
'Declaration Public Property GetPasswordCallback As DocumentReaderGetPasswordCallback
'Usage Dim instance As DocumentReaderLoadOptions Dim value As DocumentReaderGetPasswordCallback instance.GetPasswordCallback = value value = instance.GetPasswordCallback
public: property DocumentReaderGetPasswordCallback^ GetPasswordCallback { DocumentReaderGetPasswordCallback^ get(); void set ( DocumentReaderGetPasswordCallback^ value); }
Some of the documents opened by the reader such as PDF might be encrypted with a password. To open these documents, you must use one of the following:
If the password is known in advance, then simply set it in the Password property of the DocumentReaderLoadOptions instance passed to DocumentReader.Create.
If the password is unknown before loading, then set a callback in the GetPasswordCallback property. The reader will invoke this callback when an encrypted document is encountered. You can then prompt the user for the password using a dialog box.
For an example, refer to DocumentReaderLoadOptions.