←Select platform

Decrypt Property

Summary

Provides options for loading any encrypted file.

Syntax

C#
VB
Objective-C
C++
Java
public CodecsDecryptOptions Decrypt { get; } 
Public Property Decrypt As CodecsDecryptOptions 
@property (nonatomic, assign) LTCodecsDecryptOptions Decrypt 
public CodecsDecryptOptions getDecrypt() 
public: 
property CodecsDecryptOptions Decrypt { 
   bool get(); 
} 

Property Value

Class containing password values used to decrypt files.

Remarks

Provide the password for decrypting files using this property or through the RasterCodecs.DecryptPassword event.

The RasterCodecs.Pdf.Load.Password property can also be used for loading encrypted PDF files.

The difference is that RasterCodecs.Decrypt.Password can be used for decrypting any files, whereas RasterCodecs.Pdf.Load.Password can be used to only decrypt PDF files.

Example

C#
using Leadtools; 
using Leadtools.Codecs; 
 
 
public static void CodecsLoadOptionsDecrypt_Example() 
{ 
   /* This sample loads Encrypted.docx, which is encrypted with the password 'MyPassword' */ 
   using (RasterCodecs codecs = new RasterCodecs()) 
   { 
      string srcFile = @"Encrypted.docx"; 
 
      codecs.Options.Load.Decrypt.Password = "MyPassword"; 
      codecs.Options.Load.AllPages = true; 
 
      using (RasterImage image = codecs.Load(srcFile)) 
      { 
         codecs.Save(image, srcFile + ".tif", RasterImageFormat.TifLzw, 0); 
      } 
   } 
} 

Requirements

Target Platforms

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.