2 Votes Vote

How to get the number of pages in a Word Document on linux?

Posted by topdog 26 days ago Questions| pages word word document All

I saw this question PHP - Get number of pages in a Word document . I also need to determine the pages count from given word file (doc/docx). I tried to investigate phplivedocx/ZF (@hobodave linked to those in the original post answers), but I lost my hands and legs there. I can't use any outer web service either (like DOC2PDF sites, and then count the pages in the PDF version, or so...).

Simply: Is there any php code (using ZF or anything else in PHP, excluding COM object or other execution-files, such 'AbiWord'; I'm using shared Linux server, without exec or similar function), to find the pages count of word file?

EDIT: The word versions that about to be supported are Microsoft-Word 2003 & 2007.

Originally asked by: Y. Shoham on Stack Overflow

Discuss Bury


Who Voted for this Question