Is there an easy way to count the number of pages is a Word document either .doc or .docx?
Thanks
Is there an easy way to count the number of pages is a Word document either .doc or .docx?
Thanks
You could try the Apache API for word Docs:
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.
Use Apache POI's SummaryInformation to fetch the Total page count of a MS word document
Use Apache POI. Check this link
http://poi.apache.org/apidocs/org/apache/poi/hpsf/wellknown/PropertyIDMap.html#PID_PAGECOUNT