Conversion to Mhtml or html throws "Value cannot be null. Parameter name: node"

Hi,

We have found on client’s environment a docx document that breakes conversion to mhtml done by Aspose (exception is thrown: Value cannot be null. Parameter name: node).

I have removed all content from file (left only ‘test’ word) but exception still occurs.
It does occur when converting to mhtml or html.
It works when converting to docx.

LicenseHelper.SetAsposeLicense();

Aspose.Words.Document doc = new Aspose.Words.Document(@"c:\work\before_aspose.docx");
// will fail
try
{
    doc.Save(@"c:\work\after_aspose.mhtml", Aspose.Words.SaveFormat.Mhtml);
}
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
}
// will fail
try
{
    doc.Save(@"c:\work\after_aspose.html", Aspose.Words.SaveFormat.Html);
}
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
}
// will work
try
{
    doc.Save(@"c:\work\after_aspose.docx", Aspose.Words.SaveFormat.Docx);
}
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
}

I attach problematic docx.

Best regards,
Bartłomiej Chojnowski

Hi
Thank you for reporting this problem to us. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.
Best regards,

Hi,
I have the same problem when converting to HTML, MHTML, or EPUB. All other formats are working ok. I am using Office 2010. However, this does not happen all of the time. In fact, the sample Office 2010 file I posted for the DOCM to DOCX conversion problem is the file that is failing here.
Regards, Bruce

Hi Bruce,
Thanks for your request. Could you attach the document you are getting problem with? I will check the problem on my side and provide you more information.
Best regards,

Hi,
The file (tplKPN-PB.dotm) was generated by Offie 2010 and is causing the fault on save. Read this file into a document object and then save as html, epub or mhtml. The second file was for a different problem.
Thanks for your help!!
Regards, Bruce

Hi Bruce,
Thank you for additional information. I managed to reproduce the same problem with documents you have attached.
The problem occurs when you save to HTML,MHTML or EPUB because all these formats uses the same code – HTML. Most likely the problem is somewhere in our HTML module.
Best regards,

Hi,
Thank you for your reply. I am not clear on what you mean by ‘The problem is somewhere in your HTML module’.
I basically read the file and save the file using the save method (with HTMLSaveOptions). I am using Windows 7, VS2010, and Office 2010. Which HTML module are you referring to?
Also, I can save the document as PDF, Word (DOC), RTF, FLASH, etc without any problems. I can save other files as HTML, ePUB, or MHTML.
Are you saying that the version of Office 2010 that created the file might have saved the file with some settings that are different than expected?
Could you clarify what I need to look at?
Regards, Bruce

Hi Bruce,
Sorry, it was a typo, I meant in our HTML module. We will let you know once the problem is resolved.
Best regards,

The issues you have found earlier (filed as WORDSNET-4792) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as WORDSNET-4792) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(1)