We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Export word to html with different footer setting

Hello, supporting team,

I have a word document and it has footer, after I set footer "Differerent First Page" and convert it to html, I found the second page's footer still is same as first page's.

It's a bug or need sepcial code can avoid it? please check attached word file, the html file like below after run code doc.Save("test.html").

Thanks for the help!


Page 1

Footer 1

Page 2

Footer 1 // (It should be Footer 2)

Hi Dang,

Thanks for your inquiry. You can use HtmlSaveOptions.ExportHeadersFootersMode property to specify how headers and footers are output to HTML, MHTML or EPUB. Default value is PerSection for HTML/MHTML and None for EPUB.

Please note that it is hard to meaningfully output headers and footers to HTML because HTML is not paginated. When this property is PerSection, Aspose.Words exports only primary headers and footers at the beginning and the end of each section. When it is FirstSectionHeaderLastSectionFooter 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.

If we can help you with anything else, please feel free to ask.

Best regards,