Imported from antiword-0.33.tar.gz.
[antiword.git] / Docs / Netscape
blob022a669309dfdce0d854dda3b6c5584e7bdb10ef
1 From: "Craig D. Miller" <Craig.D.Miller@jpl.nasa.gov>
3 Hi,
5 Steps to integrate antiword into NetScape 4.73 (should also work with earlier
6 versions).
8 Programs that launch from netscape must startup an X window to display their
9 output (otherwise output ends up it the bit bucket on your system).  I wrote the
10 following script to do this for antiword (and saved it as
11 "/usr/local/bin/xantiword":
13 #!/bin/csh -f
14 setenv FILE $1
15 setenv NEWFILE ${FILE}.xantiword
16 /usr/local/bin/antiword $FILE >&$NEWFILE
17 /usr/bin/X11/xterm -title "$FILE (MS Word)" -e /usr/bsd/more $NEWFILE
18 rm -f $NEWFILE
20 The above script works, but may not be the best way to do it.  If you come up
21 with a more elegant solution, then please let me know.
23 Next you'll have to tell netscape to execute the "/usr/local/bin/xantiword"
24 script when word documents are clicked on.  The easiest way to do this is to
25 change the /usr/local/lib/netscape/mailcap netscape configuration file.  For
26 SGI version of netscape the following two lines are changed.  For other versions
27 of netscape, one should find similar lines or will need to add the new lines.
29 Old lines (try to run SoftWindows, which is not installed on my system):
31     application/x-dos_ms_word; /usr/local/lib/netscape/swinexec %s winword; \
32         description="Microsoft Word-for-Windows Document";
33     application/msword; /usr/local/lib/netscape/swinexec %s winword; \
34         description="Microsoft Word-for-Windows Document";
36 New lines (for antiword execution), which replace old lines on my system:
38     application/x-dos_ms_word; /usr/local/bin/xantiword %s; \
39         description="Microsoft Word-for-Windows Document";
40     application/msword; /usr/local/bin/xantiword %s; \
41         description="Microsoft Word-for-Windows Document";
43 These changes can also be made via the netscape preferences, under
44 Navigator/Applications, but then the changes would only be for the user that
45 changed them.  The above change to the mailcap file affects all users, which is
46 what you'll usually want.
48  Note that the above file paths may be different for your system.  On our linux
49 box, a quick search DID NOT show where the mailcap for netscape was stored, but
50 I did find one in /etc/mailcap.  I don't have time to experiment to see if this
51 is the same one that netscape uses.
53 If you have questions then please E-mail me.
55 - Craig
57 ===============================================================================
59 From: "Craig D. Miller" <Craig.D.Miller@jpl.nasa.gov>
61 Hi,
63 I just discovered a program called "xless".  It would actually be easier to use
64 than my previous xterm/more solution.  To use it change the
65 "/usr/local/bin/xantiword" script to: 
67 #!/bin/csh -f
68 setenv FILE $1
69 /usr/local/bin/antiword $FILE | /usr/freeware/bin/xless \
70             -title "$FILE (MS Word)" -geometry 100x60
72 Note that one also needs to have xless installed.  It can be found on the
73 SGI Freeware Feb 1999 (or later) CD-ROM.
75 - Craig
77 ===============================================================================
79 From: Bruno Crochet <bruno.crochet@pse.unige.ch>
81 Hi!
83 Another way to integrate antiword into netscape is to copy the following
84 line in your .mailcap file :
86 application/msword; ns="%s"\; nf="${ns}".ps\; antiword -pa4 "${ns}" >
87 "${nf}"\; gv "${nf}"\; sleep 2 \; rm "${nf}"
89 Bruno.
91 ===============================================================================
93 From: Andoni Zarate <azarate@saincotrafico.com>
95 In order to view the file into netscape you can write the xantiword file
96 like this:
98 #!/bin/csh -f
99 setenv FILE $1
100 setenv NEWFILE ${FILE}.xantiword
101 /usr/local/bin/antiword $FILE >&$NEWFILE
102 netscape -remote 'openFile('$NEWFILE')'
104 Andoni Zárate.
106 ===============================================================================
108 From: Evelyne Pinter <epinter@ptcs.ch>
110 I include a script for netscape to see the document with ghostview.
112 #!/bin/csh -f
113 setenv FILE $1
114 setenv NEWFILE ${FILE}.xantiword
115 /usr/local/bin/antiword -pa4 $FILE >&$NEWFILE
116 /usr/X11R6/bin/gv $NEWFILE
117 rm -f $NEWFILE
119 In netscape the application must be called like that
120 "/usr/local/bin/xantiword %s"
122 This is just a small change(done by Roger Luechinger) to the xantiword
123 you included in the distribution 0.31
125 Thanks
127 SG E.M.S.P.
129 ===============================================================================