Convert eml to pdf using PDFnet sdk


Is there any option to convert eml to pdf?


Yes, on Windows, but exact step depends if MS Office is installed or not.

If you have MS Office installed, then The .eml format is actually a plain text version of .mhtml. So if you change the extension to .mht then MS Office will handle the conversion.

Otherwise, on Windows OS you can install our virtual printer driver. You will also need a 3rd party application that can print EML files.

This forum post explains in more detail.

If it isn’t clear in the post above, to install the virtual printer (only needed to be done once on a machine, where the process has elevated rights), see our Convert test.

// optional set your own custom printer name //pdftron.PDF.Convert.Printer.SetPrinterName("My Custom Printer Name"); if (!pdftron.PDF.Convert.Printer.IsInstalled()) pdftron.PDF.Convert.Printer.Install();

1 Like

Hello Ryan,

Where can I see the supported files that I can convert into PDF?


Yes, this post shows in detail, and gets updated accordingly.

If you have Outlook installed, then a better way to handle EML files is to utilize the code in this repository.

Thanks Pal!!

It is successfully working to convert EML file to PDF format.

I have also find out that this solution would fail if we have hundreds of EMLs file. Then one by one file conversion would be a hectic and time consuming process. It wouldn’t be beneficial until I am switching to some tools. Later on, I have decided to convert EML files into PDF in bulk which makes it possible by using ZOOK EML to PDF Converter. It is so simple and an effortless way for saving EML files into PDF format without losing any data.

I hope it works for others as well!