Converting MHTML to PDF throws "Absent or unexpected Content-Transfer-Encoding header's value detected." exception

I have a simple code converting an .eml-File to mhtml and then converting it to a PDF file.
This works by using Aspose Email and Aspose Html.

I have emails where this process breaks with above exception. Converting to mhtml works, but converting to pdf breaks.

Here is a screenshot of the exception within visual studio:
image.png (155.7 KB)

I have created and attached an example visual studio solution using Aspose Email 23.4.0 and Aspose Html 23.5.0, but the problem is also with older versions.

I can open the *.eml-Files without problems in Outlook.

src.zip (393.3 KB)

Thanks for having a look!

@HauptlorenzAG

We are checking it and will get back to you shortly.

1 Like

Are there any news to this topic? Thanks!

@HauptlorenzAG

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): HTMLNET-4601

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.

1 Like

Seems also to be related to Convert mht to pdf using ASPOSE.PDF (No html part found).
For some emails I’m receiving “no html part found” exception.

I’ve found a workaround by converting *.eml → *.mhtml → *word → pdf as described here:

Seems to be a lot slower, but works.

@HauptlorenzAG

It is nice to know that you have found a workaround. We have recorded your comments as well and will surely inform you once the issue is resolved. We apologize for the inconvenience.