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

Free Support Forum - aspose.com

Hiding Headers and Footers

I would like to hide headers and footers from a document template, not remove them, simply hide them. I think the following should work:
On download to user

doc.ViewOptions.ViewType = ViewType.Web;

On upload to server after user makes changes to body text

doc2.ViewOptions.ViewType = ViewType.PageLayout;

Is there a better way to accomplish this?

Thanks for your inquiry. Unfortunately I don’t see other way to hide Header/Footer from document.
MS Word has option for this “Hide white spaces” (On the Tools menu, click Options. Click the View tab and then click to select or clear the White space between pages check box.).
Best regards.

thank you for researching my query