home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.windows.open-look:3451 comp.text.frame:2585
- Path: sparky!uunet!olivea!sgigate!odin!mips!swrinde!cs.utexas.edu!asuvax!ncar!ncar.ucar.edu!era
- From: era@ncar.ucar.edu (Ed Arnold)
- Newsgroups: comp.windows.open-look,comp.text.frame
- Subject: ps->raster conversion under OW3.0?
- Message-ID: <1992Aug13.210054.12438@ncar.ucar.edu>
- Date: 13 Aug 92 21:00:54 GMT
- Sender: news@ncar.ucar.edu (USENET Maintenance)
- Reply-To: era@ncar.ucar.edu (Ed Arnold)
- Organization: Nat'l Center for Atmospheric Research (NCAR); Boulder, CO
- Lines: 98
-
- We have a user here who has been using a script he got off the net,
- along with OpenWindows, to convert postscript files to raster. When
- we changed from OW2.0 to OW3.0 (both under SunOS 4.1.1), the script
- would no longer work. Specifically, it calls xnews, which issues the
- error message "dlopen: stub interception failed", then dumps core.
-
- Anyone know why the script fails, or can anyone suggest another
- reliable way to do this? The user would rather not use ghostscript.
- Please email to me, I will summarize if there is any response.
-
- Here's the script that has started failing under OW3.0. Thanks
- in advance for your help ...
- ---->8-----cut here----->8-----cut here----->8-----cut here----->8----
- #! /bin/sh
- # @(#)ps2bits 1.2 89/12/12
- # ps2bits - PostScript to Rasterfile converter.
- #
-
- USAGE="Usage: `basename ${0}` [-in s] [-out s] [-dpi x y] [-size w h] [-color]"
- OUT="pspage"
- IN="%stdin"
- DPIX=72
- DPIY=72
- XSIZE=8.5
- YSIZE=11
- DEPTH=1
-
- export OPENWINHOME XNEWSHOME LD_LIBRARY_PATH
-
- OPENWINHOME="${OPENWINHOME-/usr/local/OpenWindows}"
- XNEWSHOME=${OPENWINHOME}
- LD_LIBRARY_PATH=${OPENWINHOME}/lib:/lib
-
- if [ ! -f $OPENWINHOME/etc/NeWS/redbook.ps ]; then
- echo "`basename $0`: xnews is not installed correctly in $OPENWINHOME" 1>&2
- echo " (set \$OPENWINHOME to where it is installed...)" 1>&2
- exit 1
- fi
-
- while [ ${#} -gt 0 ]; do
- case "${1}" in
- -color) shift;
- DEPTH=8
- ;;
- -out) shift;
- OUT=${1} shift
- ;;
- -in) shift;
- IN=${1} shift
- ;;
- -size) shift;
- XSIZE=${1} shift;
- YSIZE=${1} shift
- ;;
- -dpi) shift;
- DPIX=${1} shift;
- DPIY=${1} shift
- ;;
- *) echo ${USAGE};
- exit 0
- ;;
- esac
- done
-
- $OPENWINHOME/bin/xnews -init "
- /currentpacking false def
- /setpacking { pop } def
- (NeWS/basics.ps) (r) file cvx exec
- (NeWS/redbook.ps) (r) file cvx exec
-
- 500 dict begin % start userdict
- false setautobind
- /bind {} def
-
- /showpage { copypage erasepage initgraphics } def
- /_pageno 0 def
- /copypage {
- /_pageno _pageno 1 add store
- (${OUT})
- clippath writecanvas
- } def
-
- ${DPIX} ${XSIZE} mul ${DPIY} ${YSIZE} mul ${DEPTH}
- [ ${DPIX} 72 div 0 0 ${DPIY} 72 div neg 0 7 index ]
- null buildimage setcanvas
- erasepage initgraphics
-
- % hack for bug in folio initialization code.
- /Courier findfont 10 scalefont setfont () stringwidth pop pop
-
- (${IN}) (r) file cvx exec
- shutdownserver
- "
- ---->8-----cut here----->8-----cut here----->8-----cut here----->8----
- --
- Ed Arnold * NCAR * POB 3000, Boulder, CO 80307-3000 * 303-497-1253(voice)
- 303-497-{1298,1137}(fax) * internet: era@ncar.ucar.edu * bitnet: era@ncario
- compuserve: internet:era@ncar.ucar.edu
-