Tom Cruickshank wrote:
Hello,
Would anyone know or could point me to a link which might have a way for
php to read a word document?
The code will run on linux, so unfortunately cannot use COM.
I've done research on a third application tool which converts docs to html,
but have yet to find one which keeps proper formatting and doesn't need root
to install it.
In what sense do you require the formatting to be preserved? If it's the
*structure* that you need to keep for some reason (and they're complex
docs) you'll likely have an uphill battle. Word isn't the best tool for
that sort of thing, so you'll be starting from a handicapped position to
begin with.
Will you only be displaying the contents? If so, you'll want to convert
it to HTML, so either figure out a way to make whatever tool you've
already looked into work or find another. Perhaps you could convert to
HTML, then use the DOM functions with the output if you want to get at
certain elements of the result.
You didn't say what you've already tried so i'll just list these:
wv
Converts to plaintext, HTML, PDF, etc.
http://freshmeat.net/projects/wv/
catdoc
Convert MSWord files to plaintext
http://freshmeat.net/projects/catdoc/
word2x
Convert to plaintext, HTML, and LaTeX.
http://word2x.sourceforge.net/
brian
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php