|
|
The interpreter recognizes several switches described below, which may appear anywhere in the command line and apply to all files thereafter.
You can get a help message by invoking Ghostscript with the -h or -? option. This message also lists the available devices.
Ghostscript may be built with multiple output devices. Ghostscript normally opens the first one and directs output to it. To use device xyz as the initial output device, include the switch
-sDEVICE=xyzin the command line. Note that this switch must precede the first .ps file, and only its first invocation has any effect. For example, for printer output in a normal configuration that includes an Epson printer driver, you might use the shell command
gs -sDEVICE=epson myfile.psinstead of just
gs myfile.psAlternatively, you can type
(epson) selectdevice (myfile.ps) runAll output then goes to the printer instead of the display until further notice. You can switch devices at any time by using the selectdevice procedure, e.g.,
(vga) selectdeviceor
(epson) selectdeviceAs yet a third alternative, you can define an environment variable GS_DEVICE as the desired default device name. The order of precedence for these alternatives, highest to lowest, is:
selectdevice (command line) GS_DEVICE (first device in build list)
To select the density on a printer, use
gs -sDEVICE=<device> -r<xres>x<yres>For example, on a 9-pin Epson-compatible printer, you can get the lowest-density (fastest) mode with
gs -sDEVICE=epson -r60x72and the highest-density mode with
gs -sDEVICE=epson -r240x72.
If you select a printer as the output device, Ghostscript also allows you to control where the device sends its output. Normally, output goes directly to a scratch file on Unix systems. To send the output to a series of files foo1.xyz, foo2.xyz, ..., use the switch
-sOutputFile=foo%d.xyzThe %d is a printf format specification; you can use other formats like %02d. Each file will receive one page of output. Alternatively, to send the output to a single file foo.xyz, with all the pages concatenated, use the switch
-sOutputFile=foo.xyz
On Unix systems, you can send the output directly to a pipe. For example, to pipe the output to the command `lpr' (which, on many Unix systems, is the command that spools output for a printer), use the switch
-sOutputFile=\|lprYou can also send output to stdout for piping with the switch
-sOutputFile=-In this case you must also use the -q switch, to prevent Ghostscript from writing messages to stdout.
To find out what devices are available, type
devicenames ==after starting up Ghostscript. Alternatively, you can use the -h or -? switch in the command line; the help message also lists the available devices.
To select a different paper size, use the command line switch
-sPAPERSIZE=a_known_paper_size
e.g.,
-sPAPERSIZE=a4
or
-sPAPERSIZE=legal
As of this printing, the known paper sizes, defined in gs_statd.ps, are:
PAPERSIZE X" Y" X cm Y cm ----------------------------------------------------- 11x17 11" 17" 27.94 43.18 a0 33.0556" 46.7778" 83.9611 118.816 a10 1.02778" 1.45833" 2.61056 3.70417 a1 23.3889" 33.0556" 59.4078 83.9611 a2 16.5278" 23.3889" 41.9806 59.4078 a3 11.6944" 16.5278" 29.7039 41.9806 a4 8.26389" 11.6944" 20.9903 29.7039 a5 5.84722" 8.26389" 14.8519 20.9903 a6 4.125" 5.84722" 10.4775 14.8519 a7 2.91667" 4.125" 7.40833 10.4775 a8 2.05556" 2.91667" 5.22111 7.40833 a9 1.45833" 2.05556" 3.70417 5.22111 archA 9" 12" 22.86 30.48 archB 12" 18" 30.48 45.72 archC 18" 24" 45.72 60.96 archD 24" 36" 60.96 91.44 archE 36" 48" 91.44 121.92 b0 39.3889" 55.6667" 100.048 141.393 b1 27.8333" 39.3889" 70.6967 100.048 b2 19.6944" 27.8333" 50.0239 70.6967 b3 13.9167" 19.6944" 35.3483 50.0239 b4 9.84722" 13.9167" 25.0119 35.3483 b5 6.95833" 9.84722" 17.6742 25.0119 flsa 8.5" 13" 21.59 33.02 flse 8.5" 13" 21.59 33.02 halfletter 5.5" 8.5" 13.97 21.59 ledger 17" 11" 43.18 27.94 legal 8.5" 14" 21.59 35.56 letter 8.5" 11" 21.59 27.94 note 7.5" 10" 19.05 25.4
Each of these (GS_LIB_DEFAULT, GS_LIB, and -I parameter) may be either a single directory, or a list of directories separated by a `:'.
See the file `use.txt' for a more complete list of resources.
To set these resources, put them in a file (such as ~/.Xresources) in the following form:
Ghostscript*geometry: 612x792-0+0 Ghostscript*xResolution: 72 Ghostscript*yResolution: 72
Then load the defaults into the X server:
% xrdb -merge ~/.Xresources
|
|
Created by unroff & hp-tools. © by Hans-Peter Bischof. All Rights Reserved (1997).
Last modified 21/April/97