Welcome Guest Search | Active Topics | Sign In | Register

Email to PDF including Images Options
emapsite
Posted: Friday, March 22, 2024 1:50:14 PM
Rank: Newbie
Groups: Member

Joined: 4/19/2023
Posts: 2
Hello,

I'm using the Eo.Pdf library to save an EmailMessage from Microsoft Exchange as a pdf on a local file store.

The problem I'm having is the images aren't included if they're inside an email. They are just placeholders. I've read a couple of articles about using MHtml and after extracting the MimeContent from the email and producing the PDF I end up with a large string that's unintellible. Some articles say about ensuring the PDFMaker is compatible with MHtml, but I'm wondering this is the correct way of doing it or I'm wasting my efforts and should be trying a different approach.

Has anyone managed to get it to work?

Tldr - I want images to appear inline when saving an EmailMessage from Microsoft Exchange as a PDF.

Thanks
eo_support
Posted: Monday, March 25, 2024 1:20:41 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

Our HTML to PDF converter does support mhtml file. For example, if you have a MHTML file like test.mhtml, you can simply do:

Code: C#
HtmlToPdf.ConvertUrl("test.mhtml", "result.pdf");


And images should be converted automatically. If you still have problem, you can send us a test mhtml file and we will be happy to investigate further. See here for more information on sending test files to us:

https://www.essentialobjects.com/forum/test_project.aspx

Thanks!
emapsite
Posted: Wednesday, March 27, 2024 5:31:19 AM
Rank: Newbie
Groups: Member

Joined: 4/19/2023
Posts: 2
Thanks for the info. I will try that, but in the interim I converted the CID images to Base64 and embedded them in the standard HTML before converting.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.