Is there an easy way to count the number of pages is a Word document either .doc or .docx?
Thanks
Page count with the Microsoft Word statistics window. You can access the word-count statistics pop-up window, where the Microsoft Word displays the number of pages. You can open it via the Review tab > Proofing > Word Count.
Reading Word Documents docx file in Python, call docx. Document() , and pass the filename demo. docx. This will return a Document object, which has a paragraphs attribute that is a list of Paragraph objects.
You could try the Apache API for word Docs:
http://poi.apache.org/
It as a method for getting the page count:
public int getPageCount()
Returns: The page count or 0 if the SummaryInformation does not contain a page count.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With