|
|||||
Viewing StarOffice Documents from Netscape |
Dan Anderson,
SSP Software |
Netscape cannot view StarOffice documents directly. Here's two solutions to this problem--the "tedious method" and the "direct method".
This is called the Tedious Method because you have to save every document you wish to view and separately call StarOffice (soffice) from the command line.
soffice <name of file you just saved>For example,
soffice /var/tmp/ssp3.3_toi.sddIf that doesn't work, try "~/office52/bin/soffice" instead of "soffice"
To view StarOffice documents from Netscape, you must tell Netscape what application to use to display the document.
For StarOffice documents on a web server (addresses beginning with "http://"), Netscape uses MIME Types. The MIME Type (and other information about a document) is sent from the web server where you requested the document.
For StarOffice documents viewed on a local filesystem or FTP server, Netscape uses file extensions to determine the MIME Type.
#!/bin/sh # netscapestaroffice # Dan Anderson >danx@West< 02/2000 # # Run StarOffice from Netscape # See http://esp.west/~danx/netscapestaroffice.html # # To setup in Netscape, Edit -> Preferences -> Navigator -> Applications # # Description: StarOffice document # MIMEType: application/staroffice # Handled by: /home/<my_login_name>/bin/netscapesoffice %s # Suffixes: sdw,sdc,sdd,sda,smf,sds,vor,sgl # Handled by: Application /home/<my_login_name>/bin/netscapesoffice %s # # (Replace <my_login_name> with your Solaris login name (e.g., "danx")) # # (This information is saved in $HOME/.mailcap) # LD_LIBRARY_PATH=/usr/dt/lib export LD_LIBRARY_PATH #Update this for newer versions of StarOffice: #MYSTAROFFICEDIR=$HOME/Office51a/bin MYSTAROFFICEDIR=$HOME/office52 if [ ! -f "${1}" ] ; then echo "Missing document filename: $1." exit 1 fi TMPDOCFILE="/tmp/t_$$_`basename \"${1}\"`" cp "${1}" "${TMPDOCFILE}" if [ ! -d $MYSTAROFFICEDIR ] ; then echo "Cannot find directory $MYSTAROFFICEDIR." echo "Do you have StarOffice configured?" exit 1 fi $MYSTAROFFICEDIR/soffice -f "${TMPDOCFILE}" rm -f ${TMPDOCFILE}
This script is at
/home/danx/bin/netscapestaroffice
For those outside of DHPG-San Diego, it's at
/net/udcsd.west/export/home0/danx/bin/netscapestaroffice
StarOffice test document:
http://esp.west/~danx/16d/16d_toi.sdd
StarOffice Test Document:
http://www.sun.com/dot-com/tools/99-1105.sdd
All Sun web servers that have StarOffice documents should define StarOffice document types. Otherwise, the web server think's it's a plain text file (MIME type "text/plain"). To do this with Apache, use this line in httpd.conf:
Similarly, for other web server software, add MIME type "application/staroffice" for these file extensions: .sdw .sdc .sdd .sda .smf .sds .vor .sgl
AddType application/staroffice sdw sdc sdd sda smf sds vor sgl
Description | MIMEType | Suffixes |
---|---|---|
Microsoft Word Document | application/msword | doc,dot |
Microsoft Excel Worksheet | application/excel | xls,xlt,xlm,xld,xla,xlc,xlw,xll |
Microsoft Powerpoint Presentation | application/powerpoint | ppt |
WordPerfect Document | application/wordperfect5.1 | wpd,wp6,wp |
The "Handled By" field is the same as for native StarOffice documents.
Notes
Accessing StarOffice 5.2 Docs Using Netsape Notes by IT to do the same thing as described here, in a slightly different manner.
|
http://esp.West/~danx/netscapestaroffice.html
Sun
Proprietary/Confidential: Internal Use Only
Feedback
to Daniel.Anderson@West