We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to convert EML or MSG to PDF

Platform: WinForms |
Control: PDF |
Published Date: January 5, 2016 |
Last Revised Date: December 4, 2018

Syncfusion HTML to PDF for .NET used to convert webpages, SVG, MHTML, and HTML to PDF. Using this library, you can convert EML or MSG to PDF using C# and VB.NET.

Assemblies required

  • Syncfusion.Compression.Base.dll
  • Syncfusion.HtmlConverter.Base.dll
  • Syncfusion.Pdf.Base.dll
  • QtBinaries folder

You can get all the previously mentioned assemblies and QtBinaries by installing the HTML converter installer available in the following link.

HTML converter: https://www.syncfusion.com/downloads/latest-version

Steps to convert EML or MSG to PDF programmatically:

  1. Create a new C# Windows Forms application project.

  1. Install the Syncfusion.HtmlToPdfConverter.QtWebKit.WinForms NuGet package as reference to your .NET Framework application from NuGet.org.

  1. Copy the QtBinaries folder from the installed HtmltoPdfConverter package and paste it into the folder, which contains the EML_MSG_To_PDF.csproj file.

  1. Include the following namespaces in the Form1.Designer.cs file.

 

 

  1. Use the following code snippet to convert EML or MSG to PDF.

 

A complete working sample can be downloaded from EML_MSG_To_PDF.zip

By executing the program, you will get the PDF document as follows.

 

Take a moment to peruse the documentation for Converting HTML string to PDF, where you will find other options for URL to PDF, bookmarks, and hyperlinks.

A code project link for Reading an Outlook MSG File.

ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon