@crh3675Jun 16.2004 — #That can be difficult since Word has single lines of code that can be well over 2500 characters. The closest way I know is to count lines and assume that 250 lines=1 page. I know it's not 100% accurate but I also know that a formatted text Word document of 5 pages comes out to 1253 lines when viewed in a text editor.
@redijediJun 16.2004 — #I don't know if this is the best way, but it's certainly fun: Export the word file to XML before uploading. On upload use your XML parsing weapon of choice (DOM, SAX) to find the <o:Lines> node. This node contains the line numbers. There are also many other metadata available.
On second thought, forget the xml parsing and use a regex. That would be much simpler.
I never got it to work, and it more than likely will not work on *nix boxen, but php does have some com functionality if you wish to wrestle with that.