Get Document Page Count
I am using Xceed.Words.NET (v. 1.2.1 per Nuget PM) for C#.
My code builds a document file that I merge smaller document files into. The problem I'm having is that the file gets very large. So I'm trying to check the page count periodically (and start an additional document as needed).
The new document is created using the DocX class - but I don't see any methods or properties that will help count pages.
Any ideas would be appreciated.
Hi, Currently there are no pages count method. DocX create docx document by populating ooxml so that MS Word can read it. When opening a docx with MS Word, the visual pages are filled by reading the ooxml from start. So the page count is not known until MS Word has parsed all the docx ooxml.
For now, I would suggest to merge X docx together and when you reach the wanted X, juste start an additional document.