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 LFileSettings::SetDecryptOptions.
The decryption password for the PDF files can also be provided using FILEPDFOPTIONS.szPassword by calling LFileSettings::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 LFileSettings::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
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.