- I have some bullet points in docx,
- I convert docx to htm
- When I convert htm to docx I loose bullet points functionality i.e. they dont behave as bullet points as in original document before conversion.
I have attached examples in zip file containing
- Source docx file i.e. source.docx
- Htm conversion of docx file i.e. out.html
- Docx converion of htm file i.e. out.docx. This is the file with issue
example.zip (156.9 KB)
Code to reproduce the problem:
string rootDir = @“c:\temp”;
string sourceDocxPath = Path.Combine(rootDir, “source.docx”);
string outHtmPath = Path.Combine(rootDir, “out.htm”);
string outDocxPath = Path.Combine(rootDir, “out.docx”);
//Convert docx to html
WordToolsBaseExecute.RegisterAspose();
var document = new Document(sourceDocxPath);
var htmlOptions = new HtmlSaveOptions();
htmlOptions.CssStyleSheetType = CssStyleSheetType.External;
htmlOptions.CssStyleSheetFileName = “test.css”;
htmlOptions.ExportListLabels = ExportListLabels.AsInlineText;
document.Save(outHtmPath, htmlOptions);
//Convert html to docx
var htmlLoadOptions = new HtmlLoadOptions(LoadFormat.Html, string.Empty, rootDir);
var htmlDocument = new Document(outHtmPath, htmlLoadOptions);
htmlDocument.Save(outDocxPath);