OpenXml get page number to which each paragraph

zequion 151 Reputation points
2021-10-28T03:58:30.2+00:00

I have a Word docx file and I want to retrieve all the paragraphs in OpenXml with c#.
I need to know:
1.-The number of pages of the Documents.
2.-The page number to which each paragraph belongs.

Can you show an example where the paragraphs of the document are read?

Office Open Specifications
Office Open Specifications
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Open Specifications: Technical documents for protocols, computer languages, standards support, and data portability. The goal with Open Specifications is to help developers open new opportunities to interoperate with Windows, SQL, Office, and SharePoint.
127 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Hung-Chun Yu 976 Reputation points Microsoft Employee
    2021-10-28T15:54:07.487+00:00

    Hi @zequion

    Thank you for contacting Microsoft Open Specifications Support. For how to question with OpenXml SDK, Stack Overflow would be the place. Make sure to tag your question with [openxml-sdk]

    Here is a post might be what you are looking for how-to-get-page-numbers-based-on-openxmlelement

    0 comments No comments