HTML
JPG
PDF
XML
ODT
ODT
Unlock ODT Files via C++
Remove protection from Word documents including ODT file using C++ Library.
How to Remove Protection of ODT File Using C++
In order to unlock ODT file, we’ll use
API which is a feature-rich, powerful and easy to use document protection API for C++ platform. You can download its latest version directly, just open
package manager, search for Aspose.Words.Cpp and install. You may also use the following command from the Package Manager Console.
Aspose.Words
PM> Install-Package Aspose.Words.Cpp
Unlock ODT via C++
You need
referenced in your project to execute the following workflow.
- Load protected document in an instance of Document class
- Call Unprotect() function to remove protection
- Save the result back in ODT format with save() method
System Requirements
Aspose.Words for C++ supports on all major platforms and Operating Systems. Please make sure that you have the following prerequisites.
- Microsoft Windows or a compatible OS with C++ Runtime Environment for Windows 32 bit, Windows 64 bit and Linux 64 bit.
- Aspose.Words for C++ DLL referenced in your project.
Command
// Load ODT document
System::SharedPtr<Document> doc = System::MakeObject<Document>(u"inputFileName.odt");
// Unprotect the document
doc->Unprotect();
// Save the document
doc->Save(u"unprotected.odt");