Save EmailBody as PDF file using EWS API

329 Views Asked by At

I'm using Exchange Web Services Managed API 2.0 to connect to Exchange server 2010. I wanted to download email body to a PDF file in a folder on the disk.

I do not want to use any paid third party to integrate.

Any help will be appreciated.

1

There are 1 best solutions below

2
Yosef Bernal On BEST ANSWER

PdfSharp is a great free library for creating and manipulating PDFs. See this answer, it should set you in the right direction.

Edit: Seems like PdfSharp doesn't actually provide an option to convert an HTML to PDF. I have since explored different libraries. I found that ChromeHtmlToPdf is a good free alternative and easy to use. Bear in mind that it uses Chrome to work it's magic.