Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
1 gs
2
 gs - AFPL Ghostscript interpreter/previewer
3
! $Id: gs-vms.hlp,v 1.37 2005/10/20 19:46:23 ray Exp $
4
! Ghostscript version 8.53, 20 October 2005
5
  Usage:
6
   $ gs [options] [file ...]
7
 
8
 Ghostscript is an implementation of Adobe Systems' PostScript (tm)
9
 and Portable Document Format (PDF) languages. Gs reads files in sequence
10
 and executes them as Ghostscript programs. After doing this, it reads
11
 further input from the standard input stream (normally the keyboard).
12
 Each line is interpreted separately. To exit from the interpreter,
13
 enter the `quit' command. The interpreter also exits gracefully if it
14
 encounters end-of-file. Typing the interrupt character (e.g. Control-C)
15
 is also safe.
16
 
17
2 Description
18
 The interpreter recognizes several switches described below, which
19
 may appear anywhere in the command line and apply to all files
20
 thereafter.
21
 
22
 You can get a help message by invoking Ghostscript with the -h
23
 or -? option. This message also lists the available devices.
24
 
25
 Ghostscript may be built with multiple output devices. Ghostscript
26
 normally opens the first one and directs output to it. To use
27
 device xyz as the initial output device, include the switch
28
     "-sDEVICE=xyz"
29
 in the command line.  Note that this switch must precede the first
30
 .ps file, and only its first invocation has any effect. For example,
31
 for printer output in a normal configuration that includes an Epson
32
 printer driver, you might use the command
33
      gs "-sDEVICE=epson" myfile.ps
34
 instead of just
35
      gs myfile.ps
36
 Alternatively, you can type
37
      (epson) selectdevice
38
      (myfile.ps) run
39
 All output then goes to the printer instead of the display until
40
 further notice. You can switch devices at any time by using the
41
 selectdevice procedure, e.g.,
42
      (vga) selectdevice
43
 or
44
      (epson) selectdevice
45
 As yet a third alternative, you can define a logical name GS_DEVICE
46
 as the desired default device name.  The order of precedence for these
47
 alternatives, highest to lowest, is:
48
      selectdevice
49
      (command line)
50
      GS_DEVICE
51
      (first device in build list)
52
 
53
 To select the density on a printer, use
54
      gs "-sDEVICE=<device>" -r<xres>x<yres>
55
 For example, on a 9-pin Epson-compatible printer, you can get the
56
 lowest-density (fastest) mode with
57
      gs "-sDEVICE=epson" -r60x72
58
 and the highest-density mode with
59
      gs "-sDEVICE=epson" -r240x72.
60
 
61
 If you select a printer as the output device, Ghostscript also
62
 allows you to control where the device sends its output.  Normally,
63
 output goes directly to a scratch file on Unix and VMS systems. To
64
 send the output to a series of files foo1.xyz, foo2.xyz, ..., use
65
 the switch
66
      "-sOutputFile=foo%d.xyz"
67
 The %d is a printf format specification; you can use other formats
68
 like %02d.  Each file will receive one page of output. Alternatively,
69
 to send the output to a single file foo.xyz, with all the pages con-
70
 catenated, use the switch
71
      "-sOutputFile=foo.xyz"
72
 
73
 To find out what devices are available, type
74
      devicenames ==
75
 after starting up Ghostscript. Alternatively, you can use the -h or -?
76
 switch in the command line; the help message also lists the available
77
 devices.
78
 
79
 To select a different paper size, use the command line switch
80
      "-sPAPERSIZE=a_known_paper_size"
81
 e.g.,
82
      "-sPAPERSIZE=a4"
83
 or
84
      "-sPAPERSIZE=legal"
85
 
86
  As of this printing, the known paper sizes, defined in gs_statd.ps, are:
87
 
88
  PAPERSIZE    X"         Y"         X cm      Y cm
89
  ____________________________________________________
90
  11x17        11"        17"        27.94     43.18
91
  a0           33.0556"   46.7778"   83.9611   118.816
92
  a10          1.02778"   1.45833"   2.61056   3.70417
93
  a1           23.3889"   33.0556"   59.4078   83.9611
94
  a2           16.5278"   23.3889"   41.9806   59.4078
95
  a3           11.6944"   16.5278"   29.7039   41.9806
96
  a4           8.26389"   11.6944"   20.9903   29.7039
97
  a5           5.84722"   8.26389"   14.8519   20.9903
98
  a6           4.125"     5.84722"   10.4775   14.8519
99
  a7           2.91667"   4.125"     7.40833   10.4775
100
  a8           2.05556"   2.91667"   5.22111   7.40833
101
  a9           1.45833"   2.05556"   3.70417   5.22111
102
  archA        9"         12"        22.86     30.48
103
  archB        12"        18"        30.48     45.72
104
  archC        18"        24"        45.72     60.96
105
  archD        24"        36"        60.96     91.44
106
  archE        36"        48"        91.44     121.92
107
  b0           39.3889"   55.6667"   100.048   141.393
108
  b1           27.8333"   39.3889"   70.6967   100.048
109
  b2           19.6944"   27.8333"   50.0239   70.6967
110
  b3           13.9167"   19.6944"   35.3483   50.0239
111
  b4           9.84722"   13.9167"   25.0119   35.3483
112
  b5           6.95833"   9.84722"   17.6742   25.0119
113
  flsa         8.5"       13"        21.59     33.02
114
  flse         8.5"       13"        21.59     33.02
115
  halfletter   5.5"       8.5"       13.97     21.59
116
  ledger       17"        11"        43.18     27.94
117
  legal        8.5"       14"        21.59     35.56
118
  letter       8.5"       11"        21.59     27.94
119
  note         7.5"       10"        19.05     25.4
120
 
121
  Note that the B paper sizes are ISO sizes: for information about using
122
  JIS B sizes, see `Use.htm'.
123
 
124
2 Initialization_files
125
 When looking for the initialization files (gs_*.ps), the files related
126
 to fonts, or the file for the `run' operator, Ghostscript first tries
127
 opening the file with the name as given (i.e., using the current
128
 working directory if none is specified).  If this fails, and the file
129
 name doesn't specify an explicit directory or drive, Ghostscript will
130
 try directories in the following order:
131
 
132
 1. The directory/ies specified by the -I switch(es) in the command
133
    line (see below), if any;
134
 2. The directory/ies specified by the GS_LIB logical, if any;
135
 3. The directory/ies specified by the GS_LIB_DEFAULT macro in the
136
    Ghostscript makefile.
137
 
138
 Each of these (GS_LIB_DEFAULT, GS_LIB, and -I parameter) may be either
139
 a single directory, or a list of directories separated by a `:'.
140
 
141
2 X_resources
142
 Ghostscript looks for the following resources under the program name
143
 `Ghostscript':
144
 
145
 borderWidth
146
  The border width in pixels (default = 1).
147
 
148
 borderColor
149
  The name of the border color (default = black).
150
 
151
 geometry 
152
  The window size and placement, WxH+X+Y (default is NULL).
153
 
154
 xResolution 
155
  The number of x pixels per inch (default is computed from
156
  WidthOfScreen and WidthMMOfScreen).
157
 
158
 yResolution
159
  The number of y pixels per inch (default is computed from
160
  HeightOfScreen and HeightMMOfScreen).
161
 
162
 useBackingPixmap
163
  Determines whether backing store is to be used for saving display
164
  window (default = true).
165
 
166
 See the file `Use.htm' for a more complete list of resources.
167
 
168
 To set these resources, put them in a file (such as
169
 SYS$Login:ghostscript.dat) in the following form:
170
 
171
      Ghostscript*geometry:    612x792-0+0
172
      Ghostscript*xResolution: 72
173
      Ghostscript*yResolution: 72
174
 
175
2 Options
176
 Note that VMS will convert all command line arguments to lower case
177
 if they are not within quotes. Therefore, if a certain command does
178
 not work, try again but with quotes around it.
179
 
180
  --  filename arg1 ...
181
 Takes the next argument as a file name as usual, but takes all
182
 remaining arguments (even if they have the syntactic form of switches)
183
 and defines the name ARGUMENTS in userdict (not systemdict) as an
184
 array of those strings, before running the file.  When Ghostscript
185
 finishes executing the file, it exits.
186
 
187
  -Dname=token
188
  -dname=token
189
 Define a name in systemdict with the given definition.  The token must
190
 be exactly one token (as defined by the `token' operator) and must not
191
 contain any whitespace.
192
 
193
  -Dname
194
  -dname 
195
 Define a name in systemdict with value=null.
196
 
197
  -Sname=string
198
  -sname=string
199
 Define a name in systemdict with a given string as value.  This is
200
 different from -d.  For example, -dname=35 is equivalent to the
201
 program fragment
202
      /name 35 def 
203
 whereas -sname=35 is equivalent to
204
      /name (35) def
205
 
206
  -q
207
 Quiet startup - suppress normal startup messages, and also do the
208
 equivalent of -dQUIET.
209
 
210
  -gnumber1Xnumber2
211
 Equivalent to -dDEVICEWIDTH=number1 and -dDEVICEHEIGHT=number2. This is
212
 for the benefit of devices (such as X11 windows) that require (or allow)
213
 width and height to be specified.
214
 
215
  -rnumber
216
  -rnumber1Xnumber2
217
 Equivalent to -dDEVICEXRESOLUTION=number1 and -dDEVICEYRESOLUTION=number2
218
 This is for the benefit of devices (such as printers) that support
219
 multiple X and Y resolutions. (If only one number is given, it is used
220
 for both X and Y resolutions.)
221
 
222
  -Idirectories
223
 Adds the designated list of directories at the head of the search path
224
 for library files.
225
 
226
 Note that gs_init.ps makes systemdict read-only, so the values of names
227
 defined with -D/d/S/s cannot be changed (although, of course, they can
228
 be superseded by definitions in userdict or other dictionaries.)
229
 
230
2 Special_names
231
 
232
  -dDISKFONTS
233
 Causes individual character outlines to be loaded from the disk the
234
 first time they are encountered.  (Normally Ghostscript loads all the
235
 character outlines when it loads a font.)  This may allow loading more
236
 fonts into RAM, at the expense of slower rendering.
237
 
238
  -dNOCACHE
239
 Disables character caching.  Only useful for debugging.
240
 
241
  -dNOBIND
242
 Disables the `bind' operator.  Only useful for debugging.
243
 
244
  -dNODISPLAY
245
 Suppresses the normal initialization of the output device. This may be
246
 useful when debugging.
247
 
248
  -dNOPAUSE
249
 Disables the prompt and pause at the end of each page. This may be
250
 desirable for applications where another program is `driving'
251
 Ghostscript.
252
 
253
  -dNOPLATFONTS
254
 Disables the use of fonts supplied by the underlying platform (e.g.
255
 X Windows).  This may be needed if the platform fonts look undesirably
256
 different from the scalable fonts.
257
 
258
  -dSAFER
259
 Disables the deletefile and renamefile operators, and the ability to
260
 open files in any mode other than read-only.  This may be desirable
261
 for spoolers or other sensitive environments.
262
 
263
  -dWRITESYSTEMDICT
264
 Leaves systemdict writable.  This is necessary when running special
265
 utility programs such as font2c and pcharstr, which must bypass normal
266
 PostScript access protection.
267
 
268
  -sDEVICE=device
269
 Selects an alternate initial output device, as described above.
270
 
271
  -sOutputFile=filename
272
 Selects an alternate output file for the initial output device, as
273
 described above.
274
 
275
2 Files
276
!!! Change
277
 GS_Root:[Ghostscript.gs4_0]
278
 Startup-files, utilities, and basic font definitions.
279
 
280
 GS_Root:[Ghostscript.Fonts4_0]
281
 Additional font definitions.
282
 
283
 GS_Root:[Ghostscript.gs4_0.Examples]
284
 Demo Ghostscript files.
285
 
286
 GS_Root:[Ghostscript.gs4_0.Doc]
287
 Assorted document files.
288
!!! Change
289
2 See_also
290
 The various Ghostscript document files (above).
291
 
292
2 Bugs
293
 See the network news group comp.lang.postscript.