Saving the attached MHTML file to HTML with Aspose.Words for .NET 21.9, using a custom ResourceLoadingAction action to skip external resources, causes a “System.ArgumentException: Illegal characters in path” exception:
public static void Convert()
{
var loadOpts = new Aspose.Words.Loading.LoadOptions
{
LoadFormat = Aspose.Words.LoadFormat.Mhtml,
ResourceLoadingCallback = new WordDocImageHandler()
};
var word = new Aspose.Words.Document("input.mhtml", loadOpts);
word.Save("output.html");
}
private class WordDocImageHandler : Aspose.Words.Loading.IResourceLoadingCallback
{
public Aspose.Words.Loading.ResourceLoadingAction ResourceLoading(Aspose.Words.Loading.ResourceLoadingArgs args)
{
return Aspose.Words.Loading.ResourceLoadingAction.Skip;
}
}
For the sake of correction, we have logged this problem in our issue tracking system with ID WORDSNET-22750. We will further look into the details of this problem and will keep you updated here on the status of correction. We apologize for your inconvenience.
@ast3 The fix will be included into the upcoming 21.11 version of Aspose.Words, which will be released in a week or two. We will keep you informed and let you know once it is available.
Hi, this error is still happening in the latest version (Aspose Words .NET 23.7). The original MHTML file above now works, but the attached MTHML file throws the error: input.zip (4.3 KB)
@ast3
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): WORDSNET-25665
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.