MSG to PDF post conversion issue

We are using Java Aspose Total API to convert email-msg to pdf. Post conversion we have seen Screenshots and tables are improperly Aligned in PDF file. Below source code I am using for the conversion.MSG to PDF source code.
Please take MSG and post conversion PDF file here MSG&PDF.zip (209.8 KB)

Please help me, how to covert msg to pdf properly with the full content.

Hello @ayyappa.reddy,

The table and screenshot are outside the portrait orientation of the page.
Aspose.Email does not handle the mht, it just saves it as is.
You should set the page orientation to landscape when loading to the pdf document.

MhtLoadOptions lo = new MhtLoadOptions();
mhtLoadOptions.getPageInfo().setLandscape(true);

Document doc = new Document(new ByteArrayInputStream(emlStream.toByteArray()), lo);

Thanks.

Hello @dmitry.samodurov,

When i use page orientation to Landscape, screenshot and tables not converted Properly with full of content. But when compare to the old one Landscape giving a bit width of the page.
I am using the below code to load the PDF to Landscape. Here is the Landscape document after Post conversionLandscapePDF.pdf (112.0 KB).
Can you suggest me how to get the full of content after post conversion.

 LoadOptions lo = new LoadOptions();
 Document doc = new Document(new ByteArrayInputStream(emlStream.toByteArray()), lo);
 lo.setLoadFormat(LoadFormat.MHTML);
 doc.getFirstSection().getPageSetup().setOrientation(Orientation.LANDSCAPE);
 doc.save(FilePath, SaveFormat.PDF);

@ayyappa.reddy,

You need to go to the Aspose.Pdf Support forum.

Thanks.

Hello @dmitry.samodurov,

How can we check size of the Email body width using Java API. can you please suggest something on this.

Hello @ayyappa.reddy,

Sorry, It seems that it is impossible to check a HTML body width. The width is relevant when you print HTML, such as in PDF. Perhaps there is a setting in Aspose.PDF that allows you to automatically fit the content to the page size.

Thanks.