In the resulting HTML file the collapse switch is missing. Is this feature supported in Aspose Words and how would we enable this?
The corresponding code for the transformation in our application is:
HtmlSaveOptions format =
new HtmlSaveOptions(SaveFormat.HTML);
format.setExportHeadersFootersMode(ExportHeadersFootersMode.NONE);
format.setPrettyFormat(true);
new Document(path).save(folder.getAbsolutePath() + File.separator + "out.html", format);
I added an attachment for the input and output file.
@amoll This is expected behavior. If you convert the document to HTML using MS Word the output will be exactly the same. Collapsing content under heading is MS Word feature, not document feature.
Thank you for the quick answer. Could you please give me a hint to a code snippet on how we could find specific headings in the word document and mark them with custom html css properties so that we could implement this ourselves?
It is quite obvious that headings are exported as h1 - h6. But only some of the customer headings have the collapsed property. Can I identify these via the Aspose API and if so: Is there an easy way to mark them in a way that is persisted into the html?