Incorrect output when attached dotx is converted to html

Hi,

we are using aspose words 13.6.0.0 for converting word to html . The output produced by Aspose does not match the output produced by MS Word when attached dotx is converted to html . Please find the
attached files and screenshots.

Thanks & Regards,

Thirumurthy R

Hi Thirumurthy,

Thanks for your inquiry. Please use the following code snippet to achieve your requirement.

Document doc = new Document(MYDir + "in.docx");
HtmlSaveOptions option = new HtmlSaveOptions(SaveFormat.HTML);
option.setExportHeadersFootersMode(ExportHeadersFootersMode.NONE);
doc.save(MYDir + "Out.html", option);

The HtmlSaveOptions.setExportHeadersFootersMode method specifies how headers and footers are output to HTML. When ExportHeadersFootersMode is PER_SECTION, Aspose.Words exports only primary headers and footers at the beginning and the end of each section. When it is FIRST_SECTION_HEADER_LAST_SECTION_FOOTER only first primary header and the last primary footer (including linked to previous) are exported. You can disable export of headers and footers altogether by setting this property to NONE.