Aspose.Total for .NET is a powerful package of File Format Automation APIs that can be used to easily convert MHTML to ODP in two simple steps. The first step is to use the PDF Processing API, Aspose.PDF for .NET, to transform the MHTML file format to PPTX. The second step is to use the Presentation Processing API, Aspose.Slides for .NET, to convert the PPTX to ODP.
The Aspose.Total for .NET package is a comprehensive suite of APIs that can be used to automate the process of file format conversion. It includes a range of APIs that can be used to convert a variety of file formats, including MHTML, PPTX, and ODP. The PDF Processing API, Aspose.PDF for .NET, is a powerful tool that can be used to convert MHTML to PPTX. It provides a range of features that make it easy to convert MHTML to PPTX, including the ability to preserve the formatting of the original MHTML file.
The Presentation Processing API, Aspose.Slides for .NET, is a powerful tool that can be used to convert PPTX to ODP. It provides a range of features that make it easy to convert PPTX to ODP, including the ability to preserve the formatting of the original PPTX file. It also provides a range of features that make it easy to customize the output ODP file, such as the ability to add text, images, and animations.
Using the powerful package of File Format Automation APIs, Aspose.Total for .NET, you can easily convert MHTML to ODP in two simple steps. The first step is to use the PDF Processing API, Aspose.PDF for .NET, to transform the MHTML file format to PPTX. The second step is to use the Presentation Processing API, Aspose.Slides for .NET, to convert the PPTX to ODP. With these two APIs, you can quickly and easily convert MHTML to ODP with minimal effort.
.NET API to Convert MHTML to ODP
- Open MHTML file using Document class
- Convert MHTML to PPTX by using Save method
- Load PPTX file by using Presentation class
- Save the document to ODP format using
Save
method and set
Odp
as SaveFormat
Get Started with .NET File Format APIs
Install from command line as nuget install Aspose.Total
or via Package Manager Console of Visual Studio with Install-Package Aspose.Total
.
Alternatively, get the offline MSI installer or DLLs in a ZIP file from downloads .
Document document = new Document("input.mhtml");
// save MHTML as a PPTX
document.Save("PptxOutput.pptx", SaveFormat.Pptx);
// load PPTX with an instance of Presentation
Presentation presentation = new Presentation("PptxOutput.pptx");
// call save method while passing SaveFormat.Odp
presentation.Save("output.odp", SaveFormat.Odp);
Get XMP Metadata from MHTML File via .NET
While converting MHTML to ODP, you might need extra XMP metadata information to prioritize your batch conversion process. For example you can get and sort your conversion documents based on creation date and process the documents accordingly. Aspose.PDF for .NET allows you to access a MHTML file’s XMP metadata. To get a MHTML file’s metadata, you can create a Document object and open the input MHTML file. After that, you can get the file’s metadata using the Metadata property.
Document doc = new Document("input.mhtml");
// get MHTML XMP properties
Console.WriteLine(doc.Metadata["xmp:CreateDate"]);
Console.WriteLine(doc.Metadata["xmp:Nickname"]);
Console.WriteLine(doc.Metadata["xmp:CustomProperty"]);
Create Read Only ODP File via .NET
By using Aspose.Slides for .NET API, you can further enhance the features of your conversion application. One of the feature can be to create your output file read only to increase security. The API allows you to set your ODP file to Read-Only, which means users (after they open the presentation) see the Read-Only recommendation.
Presentation presentation = new Presentation("PptxOutput.pptx");
// make ODP read only
presentation.ProtectionManager.ReadOnlyRecommended = true;
// call save method while passing SaveFormat.Odp
presentation.Save("output.odp", SaveFormat.Odp);