Free Support Forum -

Error message displays on PDF after MHtml to Pdf conversion using .NET


we use Aspose to transform EML files to PDF. According to Aspose samples and documentation, tt requires to transform the EML file to MHTML first, then open it with Aspose.Words as a document and save to PDF then.

By doing that on the attached mail, the has been created, but Adobe PDF Reader (latest version) displays an error message and further conversions with tools such as pdf2swf failed:

“An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem.“

Here the code:




import com.aspose.words.Document;

import com.aspose.words.SaveFormat;

MailMessage message = MailMessage.load(“test.eml”,


System.out.println(“Saving message in MHTML format…”);

File file = File.createTempFile(String.valueOf(new Date().getTime()),


// Save the message in MHTML format, MailMessageSaveType


System.out.println(“Loading MHTML file in Aspose.Words for Java…”);

Document document = new Document(file.getAbsolutePath());

for (Section section : document.getSections())




System.out.println("Saving the document in Pdf format....");

// Save in different supported formats



+ String.valueOf(new Date().getTime()) + ".pdf",


System.out.println("Documents saved successfully.");

In attachment you'll find:

  • EML File used for transformation (zipped)
  • screenshot.png: Screenshot of the acrobat reader error
  • message_output.pdf: Generated pdf

Best regards

Hi Vitali,

Thanks for your query. I have managed to reproduce the same issue at my side. I have logged this issue as WORDSJAVA-579 in our issue tracking system. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

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

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


thanks, issue can’t reproduced with a new version anymore.

Hi Vitali,

Thanks for your feedback. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.