Here is a working shell script to convert a lanscape postscript file into a pdf file. I'm no ghostscript expert, but after an hour or so of studying the man page and tweaking this short script, I finally got it to work without all the ugly obtuse errors. Feel free to adapt from here. #!/bin/sh gs -sDEVICE=pdfwrite -sOutputFile="$1".pdf -g6120x7920 \ -dBATCH -dNOPAUSE "$1".ps -- Hugh Esco On Wed, 6 Aug 2003, Gregory Nowak wrote: > Hi all. > > Thanks to all those who answered my bash scripting question. > I'm running into more problems, so maybe I'm better off describing > what it is I'm trying to do. > > Basically, I want to have a script that will accept a phone number, > and the name of a text file on the command line. > It would then use ghost script to turn the txt file into a g3 file, > and envoke sendfax to send a fax. > > When I want to convert a text file to a g3 file with gs, I am doing: > > gs -sDEVICE=faxg3 -sOutputFile=/tmp/fax.g3.%d file.txt > > but, I get a whole bunch of error messages from gs: > > GNU Ghostscript 5.50 (2000-2-13) > Copyright (C) 1998 Aladdin Enterprises, Menlo Park, CA. All rights > reserved. > This software comes with NO WARRANTY: see the file COPYING for > details. > Error: /undefined in This > Operand stack: > > Execution stack: > %interp_exit .runexec2 --nostringval-- --nostringval-- > --nostringval-- 2 %stopped_push --nostringval-- 2 3 > %oparray_pop --nostringval-- --nostringval-- false 1 > %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop 1 3 > %oparray_pop .runexec2 --nostringval-- --nostringval-- > --nostringval-- 2 %stopped_push --nostringval-- > --nostringval-- --nostringval-- > Dictionary stack: > --dict:916/1241(G)-- --dict:0/20(G)-- --dict:50/200(L)-- > Current allocation mode is local > Current file position is 5 > GS> > > Then, I type quit to get out of ghost script. > > If anybody could please tell me how to do what I'm trying to do > correctly, or better yet, if somebody already has a script that does > this, I would very much welcome the help/script. > Thanks. > > Greg > > > -- > Free domains: http://www.eu.org/ or mail dns-manager at EU.org > > > _______________________________________________ > Speakup mailing list > Speakup at braille.uwo.ca > http://speech.braille.uwo.ca/mailman/listinfo/speakup >