Docx to html conversion of line spacing

original.docx (31.4 KB)
Dear Aspose support team,
we can reproduce an issue converting a docx to html regarding line spacing (font settings of a certain style)

Please take a look at the attached original docx and html version.
We used the following code and tested both with aspose ,word .NET version 21.12 and 22.1

string cssPrefix = "dm";
HtmlFixedSaveOptions saveOptionsFixed = new HtmlFixedSaveOptions();
saveOptionsFixed.Encoding = new UTF8Encoding(true);
saveOptionsFixed.FontFormat = ExportFontFormat.Ttf;
saveOptionsFixed.ExportEmbeddedCss = false;
saveOptionsFixed.ExportEmbeddedImages = true;
saveOptionsFixed.ExportEmbeddedFonts = true;
saveOptionsFixed.ExportEmbeddedSvg = true;
saveOptionsFixed.PrettyFormat = true;
saveOptionsFixed.CssClassNamesPrefix = cssPrefix;
docWR.Save(@"html\output.html", saveOptionsFixed);

@christoph_schroeder01_sap_com
Please, accept our apology for the prolonged response. To correctly reproduce this issue, we need some additional information.
Please, run the following code

Document docWR = new Document("original.docx");
docWR.Save("original_AW.xps", SaveFormat.Xps);
docWR.Save("original_AW.pdf", SaveFormat.Pdf);

The output shall be two documents: “original.xps” and “original.pdf”.
Next open “original.docx” in MS Word, execute File -> Save As -> Save as type - PDF and save the specified file, for example, under “original_MS.pdf” name.
Attach all these files: “original_AW.xps”, “original_AW.pdf” and “original_MS.pdf” here on the forum.
Please note that all these steps shall be performed on one machine on which the issue appears.

original_AW.zip (48.0 KB)

BlenderPro-Heavy.zip (22.2 KB)
Sorry i forgot to attach
the style used here in word …

I extended now the code with your help and the pdf looks correct:
original_AW.pdf (25.6 KB)

Also the xps is correct (sorry i could not upload it ,so i changed the extension to ZIP) :
original_AW.zip (48.0 KB)

Just the Html seems wrong:
html.zip (28.6 KB)

Regards
Christoph

@christoph_schroeder01_sap_com I installed BlenderPro-Heavy font that you have attached, and in my case all Docx, Pdf and Html formats are displayed identically. Could you please attach a screenshot of wrong Html rendering in your case? Please, also answer the question: do you view all these formats on the same machine that has BlenderPro-Heavy font installed?

Yes i test all on the same machine, but i can understand that you may not see a difference. Its quite minimal from my point of view… But our customer made some changes to the html build by you and could get the result desired.

Issue in line spacing in xHTML.docx (220.8 KB)

difference.PNG (51.6 KB)

@christoph_schroeder01_sap_com Thank you for reporting this issue to us. I have logged it as WORDSNET-23363. We will keep you informed and let you know once it is resolved.

The issues you have found earlier (filed as WORDSNET-23363) have been fixed in this Aspose.Words for .NET 22.4 update also available on NuGet.