nickrussler / email-to-pdf-converter

Converts email files (eml, msg) to pdf
https://www.whitebyte.info/publications/eml-to-pdf-converter
Apache License 2.0
274 stars 62 forks source link

Text Overlap Issue in Landscape Oriented PDF Conversion #77

Open hellogeekzz opened 3 months ago

hellogeekzz commented 3 months ago

Issue When attempting to change the orientation to landscape in wkhtmltopdf by adding the --orientation parameter in MimeMessageConverter.java, the resulting PDF from a converted MSG file exhibits overlapping text issues.

Sample File I have attached a sample MSG file (Test email conversion.msg) for reproduction purposes: Yes

Additional Details Steps to Reproduce

  1. I clone the latest version of the project.
  2. Then I locate MimeMessageConverter.java.
  3. Modify the cmd list in the convert method as follows:

List cmd = new ArrayList<>(Arrays.asList( "wkhtmltopdf", "--viewport-size", VIEWPORT_SIZE, "--enable-local-file-access", "--orientation", "Landscape", //"--disable-smart-shrinking", "--image-quality", String.valueOf(IMAGE_QUALITY), "--encoding", charsetName));

  1. Convert the attached Test email conversion.msg using the updated code.
  2. Open the resulting PDF (Test email conversion.pdf) and observe the text overlap issue.

Expected Behavior The PDF should render in landscape orientation without any text overlap, similar to when using default portrait orientation.

Actual Behavior Text overlaps occur when the orientation is set to landscape.

Sample Files Test email conversion.msg Test email conversion.pdf

Test email conversion.zip

xiaoenswiftx commented 3 months ago

Hi nick, facing a similar problem here. Could there be a follow up on this? Mainly on the overlapping text for the landscape version. Thanks again for the cool converter!

xiaoenswiftx commented 2 months ago

Hello Nick

I hope you are doing well. Please allow me to inquire about the progress of the bug fix for this overlapping text issue. I understand how busy you are, and I'm sorry for taking up your time with this request.

Any updates would be greatly appreciated. Thank you again for the converter!