We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Docx to Html conversion - layout issue

Converting docx into html. Have some pretty bad layout.
Using 13.2 version of strategy.
z-orders for pictures calculated incorrectly, margin-left has some - values, which doesn’t allow to see entirely picture. Text has gone away because of z-orders.
Original document and result html find attached in archive.
Nothing additionally is done with document, here is the snippet that is used:

License license = new License();
license.setLicense(“Aspose.Total.lic”);
Document document = new Document(fileName);
document.save(outputFileName);

Hi Andrey,


Thanks for your inquiry.

While using the latest version of Aspose.Words i.e. 13.2.0, I managed to reproduce this issue on my side. I have logged this issue in our bug tracking system. The issue ID is WORDSNET-7933. Your request has also been linked to this issue and you will be notified as soon as it is resolved.

Sorry for the inconvenience.

Best regards,

Any update on this? Timeline?

Hi Andrey,


Thanks for your inquiry. Unfortunately, your issue is not resolved yet. The responsible developer has planned to integrate the fix in 13.5.0 release. If everything goes by plan, we are very hopeful to include the fix to your issue in Aspose.Words’ May release i.e. 13.5.0. Please note that this estimate is not final at the moment; I will be sure to inform you as soon as it is resolved. I apologize for any inconvenience.

Best regards,

The issues you have found earlier (filed as WORDSNET-7933) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

It looks much better, but there are still some issues with margin.
I used 13.5 version of Aspose.Words, the same code snippet and file.
Please see attached output.

Hi Andrey,


Thanks for your inquiry. In this case, you may want to save this document in the HTML format using absolutely positioned elements as follows:

Document doc = new
Document(@“C:\Temp\new_output\Brochure
6 frame.docx”
);

doc.Save(@“C:\Temp\new_output\out.html”,
SaveFormat.HtmlFixed);


Please let me know if I can be of any further assistance.

Best regards,

It’s not an exactly an html: when saving using SaveFormat.HtmlFixed - library generates html with svg.
For certain reasons that does not satisfy our necessity, we need plain html to be able to process html tags later.
So please revive the task to fix the layout for HTML. I can send more files with broken layouts if that is of any help.

Regarding previous post, I made a mistake. It’s an html, but the problem with it is how it is formed. It is formed with absolute positioning of html tags and paragraphs could be (and usually are) broken into many smaller pieces. We don’t expect a new span for text, if there was not change in formatting of text and for FIXED_HTML this is not the case. So it is just don’t satisfy our necessity. We need HTML.
Thank you.

Hi Andrey,


Thanks for the additional information. Please note that it is not guaranteed that the output HTML file will look exactly the same as the input Word document and in your case the latest version of Aspose.Words mimics the way the Microsoft Word exports your document to HTML format. I have attached an output HTML document that is generated using Microsoft Word 2013 here for your reference.

Best regards,