Free Support Forum - aspose.com

Rendering problems when saving Word to PNG

We are opening a Word file and rendering it page-by-page to PNG. There are some significant display differences when the page is rendered to PNG. One of the most noticeable is tabs. In the attached document, the tabs cause text to be pushed onto a new line, making the document difficult to read. Is there a solution or guidance you can give me?


I have attached a screenshot from Word of the original file (original.png), as well as the PNG file generated by Aspose.Words (aspose.png) with the misaligned tabs.

My code is:

----

Aspose.Words.License license = new Aspose.Words.License();
license.SetLicense(“Aspose.Total.lic”);

Aspose.Words.Document wordDoc = new Aspose.Words.Document(FILEPATH);

Aspose.Words.Saving.ImageSaveOptions options = new Aspose.Words.Saving.ImageSaveOptions(SaveFormat.Png);
options.PageIndex = 1;
options.PageCount = 1;
options.Scale = 1;
options.PrettyFormat = true;

wordDoc.Save(Response, FILENAME + “.png”, Aspose.Words.ContentDisposition.Inline, options);


Thanks!

Hi

Thanks for your request. Could you please attach your source document here for testing? We will check the issue and provide you more information.

Best regards,

Here is the source document.

Hello,
Thank you for your request.
I managed to reproduce your problem on my side.
Once the problem is resolved, we will notify you immediately.
As a temporary solution you can implement the markup on the page using tables insted of using tabs.