When I was trying to convert my HTML files to mhtml format but there is one problem with the converter it won’t convert to mhtml format so it needs to be fixed so that I can convert my downloaded webpages from the internet archive Wayback Machine to single file full offline webpages so that I can easily browse them offline using a offline HTML browser app for android.
Can you please share your sample file and the sample code snippet for our reference? We will test the scenario in our environment and address it accordingly.
Yes here you go.
And this time I want the converter to be fixed like asap.
So that I can use it please.
Please check the attached code snippet and the generated output file for your kind reference:
using (var document = new Aspose.Html.HTMLDocument(dataDir + "Canada Toddler Plush Chair Archive 2012 Edition.zip.html"))
{
// Initialize MHTMLSaveOptions
var options = new Aspose.Html.Saving.MHTMLSaveOptions();
// Convert HTML to MHT
Aspose.Html.Converters.Converter.ConvertHTML(document, options, dataDir + @"output.mht");
}
output.zip (15.3 KB)
We used it in our environment with Aspose.HTML for .NET 23.9 and did not face any issues. You can please check the output MHTML file and let us know in case you notice any issues in it.
And one more question about my converted output can you please rename it from .zip .HTML please because I am going to test out my converted webpages in my vasdev HTML offline browser app that I just already have downloaded from the app store because like what I have already said to you that google drive app is no longer accepting downloaded webpages from Wayback Machine placed in zip files understood as of right now.
We cannot attach the document in HTML format as this forum would not allow. The ZIP archive we shared earlier already contains the file in MHTML format that you asked for. Can you please be more clear why do you need the output file in HTML format if you already have HTML format version of your file?