Hi Pushkar,
The Word document is a flow document in
which contents (paragraphs, tables, etc.,) will not be preserved page by page;
instead the contents will be preserved sequentially section by section. Word
viewer/editor renders the contents of the Word document page by page
dynamically when opened for viewing or editing. This page wise rendered
information will not be preserved in the file level.
Syncfusion .NET Word library is
a non-UI component that provides a full-fledged document object model to
manipulate the Word document contents. Therefore, it is not feasible to fetch
page numbers from a Word document using DocIO.
Alternatively, you can get the page number by following
the steps below:
Set the PAGE field in each section and keep each
section as a separate page.
Next, update the fields in the document
programmatically using DocIO.
Finally, locate the PAGE field and retrieve the updated
result.
Please refer to our KB to know the steps to set the page numbers based on the above alternate solution in a Word document,
Is
it possible to fetch page numbers in a Word document using DocIO? | Syncfusion
A complete
working sample to set page numbers in a Word documentt can be downloaded from GitHub.
Regards,
Anto Nihil S