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

Free Support Forum - aspose.com

Aspose.Words - Failing to show first page header

I have a .doc file which has a logo on the first page header and the other pages have another common header having the name, address and other information.

While converting the .doc to mht the first page logo header gets overriten by the other header.

How to solve this issue? Is this issue solved in the latest version i.e. 8.1.

Thanks.

Hello

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. Actually, HTML format is one page format and it does not support Headers/Footers natively. MS Word adds special tags to indicate whether an element is Header/Footer or not. This is MS Word “magic”, which it uses to roundtrip HTML to Word and vice versa.

<div style='mso-element:footer' id=f1>

<p class=MsoFooter>TEST FOOTER</p>

</div>

Currently just Primary Header/Footer are exported to HTML.

Best regards,

Aspose does not seem to honor multiple headers correctly. MS Word, as you may already be aware, can support a header that is different for just the first page. We use this capability extensively via templates. Our templates contain two headers but the reports we generate are sometimes single page and sometimes multi-page. In both these situations, Aspose ignores the first page header and simply uses the second/subsequent page header leading to incorrect conversions...

In which version will this capability be added to Aspose.Words?

Thanks,

Sushant

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for additional information. Html/Mhtml documents always have only one page, so there is no way to display FirstPage and Primary header/footer in such documents. So only Primary Header/Footer is always used. Please see the following link to learn what document features are supported during export to HTML:

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net-and-java/save-in-the-html-format.html

Anyways we will consider an ability to mimic MS Word behavior and output all headers/footers into HTML. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.

Best regards.