NYCPHP Meetup

NYPHP.org

[nycphp-talk] PHP & Word Documents

Tim Sailer sailer at bnl.gov
Mon May 9 09:21:58 EDT 2005


On Sat, May 07, 2005 at 03:25:39PM -0400, Joseph Crawford wrote:
> Hey everyone,
> 
> has anyone here ever needed the ability to parse a word document? I have a 
> client that creates his newsletters in MS Word and wants to upload them and 
> send them to his users in an HTML or text based newsletter. This wouldnt be 
> a proablem if i have ever heard of an MS Word Parser, i know there is an 
> Excel parser class.. Is there a way to parse a word document?
> 
> What i would need to do is take the contents of the word document and 
> convert it to html, saving the images from the word doc to a directory so 
> that the HTML links could show them.
> 
> Any suggestions appreciated.

users:~> antiword
        Name: antiword
        Purpose: Display MS-Word files
        Author: (C) 1998-2003 Adri van Os
        Version: 0.35  (14 Nov 2003)
        Status: GNU General Public License
        Usage: antiword [switches] wordfile1 [wordfile2 ...]
        Switches: [-t|-p papersize|-x dtd][-m mapping][-w #][-i #][-Ls]
                -t text output (default)
                -p <paper size name> PostScript output
                   like: a4, letter or legal
                -x <dtd> XML output
                   like: db (DocBook)
                -m <mapping> character mapping file
                -w <width> in characters of text output
                -i <level> image level (PostScript only)
                -L use landscape mode (PostScript only)
                -s Show hidden (by Word) text

-- 
Tim Sailer <sailer at bnl.gov> 
Information and Special Technologies Program
Office of CounterIntelligence 
Brookhaven National Laboratory  (631) 344-3001



More information about the talk mailing list