←Select platform

DocumentReaderGetPasswordCallback Delegate

Summary

Prompts the user for a password if the document is encrypted.

Syntax

C#
VB
C++
public delegate string DocumentReaderGetPasswordCallback( 
   string fileName 
) 
  
Public Delegate Function DocumentReaderGetPasswordCallback( _ 
   ByVal fileName As String _ 
) As String 
public delegate String^ DocumentReaderGetPasswordCallback(  
   String^ fileName 
) 

Parameters

fileName
The same file name passed to DocumentReader.Create.

Return Value

The password to use if this document is encrypted.

Remarks

Some documents such as PDF can be protected and cannot be read without the user supplying a password. The readers will automatically detect if a document is encrypted, and will call the DocumentReaderGetPasswordCallback delegate set in the DocumentReaderLoadOptions.GetPasswordCallback property. The application can then show a dialog box to prompt the user for the password (or set a fixed value if the password is known in advance).

Example

For an example, refer to DocumentReaderLoadOptions.

Requirements

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

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Forms.DocumentReaders Assembly