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

Free Support Forum - aspose.com

Remove Empty Pages which has header and footer alone

Hi,

Can you help me to remove empty pages in Word Document which has Header and footer alone.

@NanthiniSenthil123 Could you please attach your document here for testing? We will check the issue and provide you more information.

Word documents are not fixed page formats, they are flow, more like HTML. So, there is no easy way to determine where page starts or ends and no easy way to determine whether some particular page is blank. However, there are few options to set n explicit page break in Word document. For example,

If you delete such explicit page breaks from your document, this might help you to get rid blank pages.

Also, Aspose.Words has a method Document.ExtractPages. Using this method you can extract page by page from the document, check whether it is blank and then combine not blank pages back. But in this case each page will be represented as a separate section in the resulting document.