Some file formats (DOC, DOCX, PDF, PPT, PPTX, XLS, XLSX, XLSB, etc) are encrypted using a password. These files will be loaded properly only if your application provides a decryption password.
The decryption password for all formats can be provided through the FILEDECRYPTOPTIONS structure by calling L_SetDecryptOptions.
The decryption password for the PDF files can also be provided using FILEPDFOPTIONS.szPassword by calling L_SetPDFOptions.
The FILEDECRYPTOPTIONS structure has two mechanisms for providing a password:
If the password provided by FILEDECRYPTCALLBACK callback is not valid, the callback will be called again until one of the following happens:
The user is responsible to avoid infinite loops. If the FILEDECRYPTCALLBACK returns each time the same incorrect password, the application will go into an infinite loop, because when the callback returns an invalid password, LEADTOOLS will call it again. Then the process would never end, consuming a lot of CPU time until the user kills the application.
These settings are only valid for the current thread. In multi-threaded applications, call L_SetDecryptOptions in each thread that needs to load encrypted files.
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document