tags:

views:

521

answers:

3

Hi, for a server based j2ee application, I need to retrieve the number of pages from word documents.. any ideas what works?

+3  A: 

If the documents are modern Word 2007 format you can use direct XML-based manipulation, through OOXML. This is by far the better long term solution, though I realize it may not be realistic for an entire organization to change overnight.

If they are older Word formats, you're probably stuck with server-side Word/Excel/Powerpoint/Outlook programmable object models, although you're not supposed to do that on the server..

Jeff Atwood
+3  A: 

Regarding Office Open XML support, the latest beta of Java-POI is supposed to support it.

VonC
+1  A: 

Haven't used it before but you could try Apache POI. Looks like it has a WordCount function.

Richard Nienaber