Free Support Forum - aspose.com

Page number always return 1 with DocumentBuilder

Hi,

I have this scenario:

A word document merge with a word template which has the header. Once the 2 document have been merge then I try to retrieve the page number but with some reason it always return 1 page event the final word document has more than 1 page.

Could you give me a portion of source code that do that? I migh miss something?

I want to extract the number of page of the final document (Word document + word template) and store to the database.

Thanks,

Tan quan

Hi

Thanks for your inquiry. Unfortunately, Aspose.Words doesn’t have the possibility to get number of pages. Aspose.Words document represents content and formatting of a document, not its layout into pages. This feature is called pagination and it is not released yet.

See FAQ for more information.

Best regards.