←Select platform

Decrypt Property

Summary

Provides options for loading any encrypted file.

Syntax

C#
Objective-C
C++/CLI
Java
Python
public CodecsDecryptOptions Decrypt { get; } 
@property (nonatomic, assign) LTCodecsDecryptOptions Decrypt 
public CodecsDecryptOptions getDecrypt() 
public: 
property CodecsDecryptOptions Decrypt { 
   bool get(); 
} 
Decrypt # get  (CodecsLoadOptions) 

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; 
 
using Leadtools.ImageProcessing.Core; 
 
public 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.2023.5.5
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

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