I was able to convert email messages from a .msg (or straight out of other forms) to an mht stream (or even file) then was able to convert from mht stream (or file) into a PDF using below code. Now that the business has provided a new html formatting template for emails it fails when creating a Document object from the mht file. It fails with the following error. What is causing this error and are there other ways to convert to a PDF without loosing any formatting? I am using c# with Aspose.PDF v19.9.0.0
Email Conversion Error: System.ArgumentException: max (150000) < opt (414999)
at #=zz1OBRIAyepAEydrAfUhXpoogxauMiIFwPJK6nG8=.#=zt3YkpBg=(Int32 #=zXEzFeYE=, Int32…
code is as below formed generically.
Snippet
var mHtmlLoadOptions = new MhtLoadOptions();
Document doc = new Document(@“C:\EmailConversion\TestEmail.mhtml”, mHtmlLoadOptions);
Snippet
TestEmail.zip (8.1 KB)