If we have a numbered list in a document then the document is exported differently depending on included fonts in Aspose.Words library. The difference is that the exported items starting with 10 doesn’t have “-aw-import” style property if we include the fonts. Can you say why this happens?
I’ve attached a snippet with the document and the font.
Aspose.Words 19.1
numbered_list.zip (421.2 KB)
public class NumberedListTest {
public static void main(String[] args) throws Exception {
License license = new License();
license.setLicense(Objects.requireNonNull(NumberedListTest.class.getClassLoader().getResourceAsStream("Aspose.Words.lic")));
//depending on the presence of the font 'Cambria Bold Italic', conversion to HTML works differently
FontSettings.getDefaultInstance().setFontsFolders(new String[]{"./fonts"}, false);
HtmlSaveOptions htmlSaveOptions = new HtmlSaveOptions(SaveFormat.HTML);
htmlSaveOptions.setPrettyFormat(true);
htmlSaveOptions.setExportListLabels(ExportListLabels.AS_INLINE_TEXT);
Document doc = new Document(new FileInputStream("./numbered_list.docx"));
// -aw-import style property for items starting with 10 is absent when we include the font
doc.save("./numbered_list.html", htmlSaveOptions);
}
}