Converting msg to pdf for Outlook emails

I'm noticing an issue when converting .msg/.eml files to pdf that appears to only effect emails received from an Outlook address. I'm attaching three files. The "FW Test Email - not working.msg" file is an email I sent to myself with my Microsoft Outlook address.

When converting to pdf following the instructions from this link the From/Sent on/To/Subject/Attachment headers that get added are split on a separate page from the content of the email in the resulting pdf ("FW Test Email converted - not working.pdf").

I noticed this wasn't happening with emails I got from outside our organization, so I sent myself a message from my Gmail address ("Gmail message - working correctly.msg") and the resulting converted pdf did not have the page break.


Is this a bug? If not, is there something I can do differently to detect Outlook messages and prevent the page break from getting inserted?

Thank you.


Attachment: Test_Files_b2a8bef4.zip

2 Replies

KS Karmegam Seerangan Syncfusion Team November 17, 2023 11:29 AM UTC

Hi Matt,


We were able to reproduce the reported behavior on our end. Currently, we are validating this and will update further details on November 21, 2023.


Regards,

Karmegam



KS Karmegam Seerangan Syncfusion Team November 21, 2023 02:36 PM UTC

We have checked the reported issue with EML to PDF conversion. We internally using MsgReader for converting EML message to HTML file and then converts the HTML file to PDF. The page break added in intermediate HTML file generated by MsgReader. So, the page breaks applied in HTML to PDF conversion. You can check this behavior by opening the HTML file in your browser print preview. So, we are unable to proceed further on this. Currently we do not have support to ignore the page breaks in HTML to PDF converter.


Loader.
Up arrow icon