I have a application that to converts MSG files to PNG files.
MSG file is converted to HTML and content is displayed properly.
However, when HTML is converted to PNG then the content is not shown properly.
The styles are not applied properly.
We are seeing the issues mostly on the email headers like
From, Sent, To, Subject, Attachments.
The spacing between the From and it’s value is removed in the PNG.
The same is happening for other fields mentioned above.
Kindly suggest.
@sandeepk.t7 Could you please attach your input and output document here for testing? We will check the issue and provide you more information.
@alexey.noskov I have attached the input HTML and output PNG file. You can clearly see the difference that css is not applied in the output PNG.
test-files.zip (23.8 KB)
@sandeepk.t7 You should note, Aspose.Words is designed to work with MS Word documents. HTML documents and MS Word documents object models are quite different and it is not always possible to provide 100% fidelity after conversion one format to another. in most cases Aspose.Words mimics MS Word behavior when work with HTML documents. If you convert the provided HTML to PDF using MS Word the result is almost the same as Aspose.Words output:
MS Word: ms.pdf (27.4 KB)
Aspose.Words: out.pdf (78.9 KB)