We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Convert from mhtml to PDF throws NullReferenceException

I’m currently evaluating your product and use it to index E-Mails. I’ve found some E-Mails which are throwing NullReferenceException within the method
Converter.ConvertMHTML(htmlStream, pdfSaveOptions, tempFileNamePdf);

which converts an MHTML to PDF.

The MHTML is loaded from an .eml-File with your componenten Aspose.Email and converted to MHTML.

I will attach a sample Visual Studio solution which shows the NullReferenceException quickly.

This happens with Aspose.HTML (.NET) in Version 22.9.0.

Here is the sample VS solution including an example eml-File: EmlNullReference.zip (511.2 KB)

@HauptlorenzAG

We have logged this problem in our issue tracking system as HTMLNET-4083. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Thank you very much.

The issues you have found earlier (filed as HTMLNET-4083) have been fixed in this update. This message was posted using Bugs notification tool by avpavlysh

What is “this update”? There is no Url behind the tag.

@HauptlorenzAG

Please get the latest version of Aspose.HTML for .NET 22.10 from here:
Download Aspose.HTML for .NET 22.10

1 Like