←Select platform

Password Property

Summary

Gets or sets the password to use when loading encrypted files.

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

Property Value

Set this property to the correct password necessary for loading this encrypted file. Default value is a null string.

Remarks

The RasterCodecs.DecryptPassword event might get fired again if the password is incorrect or if you try to open another encrypted file. The CodecsDecryptPasswordEventArgs.FileName property indicates which file triggered the event (and for which you need to provide the password).

For example, you attempt the sequence of operations below:

  1. Registering a RasterCodecs.DecryptPassword event handler to be used for all loads and not setting the correct password using other means (RasterCodecs.Options.Load.Decrypt.Password or RasterCodecs.Pdf.Options.Load.Password)

  2. Loading unencrypted.pdf

  3. Loading encrypted-pass1.docx which fires the RasterCodecs.DecryptPassword event with CodecsDecryptPasswordEventArgs.FileName = "encrypted-pass1.docx". In this case, you need to set Password = pass1

  4. Loading unencrypted.xlsx

  5. Loading encrypted-pass2.xlsx which fires RasterCodecs.DecryptPassword event with CodecsDecryptPasswordEventArgs.FileName = "encrypted-pass2.xlsx". In this case, you need to set Password = pass2

The above sequence shows that it is important to pay attention to the FileName property as it will contain the file name without a password.

Refer to RasterCodecs.DecryptPassword event for more information.

Example

For an example, refer to RasterCodecs.DecryptPassword.

Requirements

Target Platforms

See Also

RasterCodecs.DecryptPassword event

CodecsDecryptPasswordEventArgs.FileName

CodecsDecryptPasswordEventArgs Class

CodecsDecryptPasswordEventArgs Members

Leadtools.Codecs Namespace

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

Leadtools.Codecs Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.