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

Free Support Forum - aspose.com

Incorrect converting DOCX to HTML

Hi Aspose Team,

When we are using Aspose.Words for saving a Word document as HTML - we are getting broken alignment for tab leaders. This bug is exists since 20.8 version.

image.png (1.7 KB)
error.zip (10.4 KB)

Document doc = new Words.Document("TOA.docx");
doc.Save("TOA.html", SaveFormat.Html);

Could you please take a look at it?

Thank you advance.

@spectr100 Thank you for reporting this to us. but i am afraid this is expected behavior. MS Word also does not align tab leaders correctly. Please see the document produced by MS Word. ms.zip (5.1 KB).
Also, I have tested the scenario with older versions of Aspose.Words and the output is the same as in the latest version. Which version of Aspose.Words gives the expected result?

Issue is appeared in 20.8 version.

I will try to find another document.

@spectr100 I have tested you document with the 20.3 version of Aspose.Words and the output is the same. Please see the attachment. out.zip (711 Bytes)
If you find the document that worked with old version and does not work with the latest version, please attach it here for investigation.

You can use my document.

Aspose loses font-size property for the paragraph after 20.8 version.
image.png (19.9 KB)

style=“margin-top:0pt; margin-left:11pt; margin-bottom:0pt; text-indent:-11pt; line-height:115%; font-size:11pt”

style=“margin-top:0pt; margin-left:11pt; margin-bottom:0pt; text-indent:-11pt”

@spectr100 In your document font size is not specified explicitly in the runs. Default font size is used. In new version of Aspose.Words default font size is specified in the <body> tag and is inherited:

<body style="line-height:115%; font-family:Calibri; font-size:11pt">

Could you please return it back?

@spectr100 I do not this would be a right solution since this will break font size inheritance roundtrip when the HTML is converted back to MS Word formats.