DocX icon indicating copy to clipboard operation
DocX copied to clipboard

Get Document Page Count

Open krb-vci opened this issue 5 years ago • 1 comments

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.

krb-vci avatar Oct 09 '20 20:10 krb-vci

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.

XceedBoucherS avatar Oct 15 '20 13:10 XceedBoucherS