📄 use.txt
字号:
Takes the next argument as a file name as usual, but takes
all remaining arguments (even if they have the syntactic
form of switches) and defines the name ARGUMENTS in
userdict (not systemdict) as an array of those strings,
*before* running the file. When Ghostscript finishes
executing the file, it exits back to the shell.
-@ filename arg1 ...
Does the same thing as -- and -+, but expands @filename
arguments.
-
This is not really a switch. It indicates to Ghostscript
that the standard input is coming from a file or a pipe.
Ghostscript reads from stdin until reaching end-of-file,
executing it like any other file, and then continues
processing the command line. At the end of the command
line, Ghostscript exits rather than going into its
interactive mode. NOTE: this switch works only for
PostScript, not for PDF.
-c tokens ...
Interprets arguments, up to the next argument that begins
with - followed by a non-digit or with @, as PostScript
code. For example, if the file quit.ps contains just
the word `quit', the following are equivalent:
quit.ps
and
-c quit
Each argument must be exactly one token, as defined by
the `token' operator.
-ffilename
Execute the given file, even if its name begins with a -
or an @. -f alone does nothing, but it provides a
convenient way to terminate the list of tokens for the -c
switch.
File searching
--------------
-Idirectories
Adds the designated list of directories at the head of the
search path for library files.
-P
Makes Ghostscript look first in the current directory for
library files. This is currently the default.
-P-
Makes Ghostscript *not* look first in the current directory
for library files (unless, of course, the first explicitly
supplied directory is `.').
Parameter setting
-----------------
-Dname=token
-dname=token
Define a name in systemdict with the given definition.
The token must be exactly one token (as defined by the
'token' operator) and must not contain any whitespace.
If the token is a non-literal name, it must be true,
false, or null.
-Dname
-dname
Define a name in systemdict with value=true.
-Sname=string
-sname=string
Define a name in systemdict with a given string as value.
This is different from -d. For example,
-dname=35
is equivalent to the program fragment
/name 35 def
whereas
-sname=35
is equivalent to
/name (35) def
-uname
Un-define a name, cancelling -d or -s.
-gnumber1xnumber2
Equivalent to -dDEVICEWIDTH=number1 and
-dDEVICEHEIGHT=number2, specifying the device width and
height in pixels. This is for the benefit of devices (such
as X11 windows and VESA displays) that require (or allow)
width and height to be specified.
-rnumber
-rnumber1xnumber2
Equivalent to -dDEVICEXRESOLUTION=number1 and
-dDEVICEYRESOLUTION=number2, specifying the device
horizontal and vertical resolution in pixels per inch. This
is for the benefit of devices (such as printers) that
support multiple X and Y resolutions.
Miscellaneous
-------------
-q
Quiet startup -- suppress normal startup messages,
and also do the equivalent of -dQUIET.
Note that gs_init.ps makes systemdict read-only, so the values of names
defined with -D/d/S/s cannot be changed (although, of course, they can be
superseded by definitions in userdict or other dictionaries.)
Special names
-------------
-dCOLORSCREEN
-dCOLORSCREEN=0
-dCOLORSCREEN=false
On high-resolution devices (at least 150 dpi resolution, or
-dDITHERPPI specified), -dCOLORSCREEN forces the use of separate halftone
screens with different angles for C/M/Y/K or R/G/B if halftones are needed
(this produces the best-quality output); -dCOLORSCREEN=0 uses separate
screens with the same frequency and angle; -dCOLORSCREEN=false forces the
use of a single binary screen. If COLORSCREEN is not specified, the default
is to use separate screens with different angles if the device has fewer
than 5 bits per color, and a single binary screen (which will never actually
be used under normal circumstances) on all other devices.
-dDELAYBIND
causes 'bind' to remember all its invocations, but not actually
execute them until the .bindnow procedure is called. Useful only for
certain specialized packages like pstotext that redefine operators.
-dDISKFONTS
causes individual character outlines to be loaded from the disk the
first time they are encountered. (Normally Ghostscript loads all the
character outlines when it loads a font.) This may allow loading more
fonts into RAM, at the expense of slower rendering. DISKFONTS is only
effective if the diskfont feature was selected in the executable; otherwise
it is ignored.
-dDITHERPPI=lpi
forces all devices to be considered high-resolution, and forces use
of a halftone screen or screens with lpi lines per inch, disregarding the
actual device resolution. Reasonable values for lpi are N/5 to N/20, where
N is the resolution in dots per inch.
-dFIXEDMEDIA
causes the media size to be fixed after initialization, which causes
pages of other sizes or orientations to be rotated or scaled automatically.
(This switch is something of a hack; when all the drivers have been updated
to report correct values for their available media, the switch will be
removed.) -g automatically sets -dFIXEDMEDIA, but -sPAPERSIZE= does not.
-dFIXEDRESOLUTION
causes the media resolution to be fixed similarly. -r automatically
sets -dFIXEDRESOLUTION.
-dLOCALFONTS
causes Type 1 fonts to be loaded into the current VM, which is
normally local VM, instead of always being loaded into global VM. Only
useful for compatibility with Adobe printers for loading some obsolete
fonts.
-dNOBIND
disables the 'bind' operator. Only useful for debugging.
-dNOCACHE
disables character caching. Only useful for debugging.
-dNOCIE
substitutes DeviceGray and DeviceRGB for CIEBasedA and CIEBasedABC
color spaces respectively. Only useful on very slow systems where color
accuracy is less important.
-dNODISPLAY
suppresses the normal initialization of the output device. This
may be useful when debugging.
-dNOFONTMAP
suppresses the normal loading of the Fontmap file. This may be
useful in environments without a file system.
-dNOGC
disables the garbage collector in Level 2 systems. Only
useful for debugging.
-dNOPAUSE
disables the prompt and pause at the end of each page. This may
be desirable for applications where another program is 'driving'
Ghostscript.
-dNOPLATFONTS
disables the use of fonts supplied by the underlying platform
(X Windows or Microsoft Windows). This may be needed if the platform
fonts look undesirably different from the scalable fonts.
-dNOPROMPT
disables only the prompt, but not the pause, at the end of each
page. This may be useful on PC displays that get confused if a program
attempts to write text to the console while the display is in a graphics
mode.
-dORIENT1=false
indicates that the file uses a value of 0 to indicate portrait
orientation to setpage[params] rather than the default orientation of 1.
This is needed for some files produced by badly designed applications that
'know' that the output will be printed on certain roll-media printers.
-dSAFER
disables the deletefile and renamefile operators, and the
ability to open files in any mode other than read-only. This may be
desirable for spoolers or other sensitive environments.
-dSHORTERRORS
makes certain error and information messages more Adobe-compatible.
-dWRITESYSTEMDICT
leaves systemdict writable. This is necessary when running
special utility programs such as font2c and pcharstr, which must bypass
normal PostScript access protection.
-sDEVICE=device
selects an alternate initial output device, as described above.
-sFONTMAP=filename1;filename2;...
specifies (an) alternate name(s) for the Fontmap file. Note that
the names are separated by ; on Unix systems, by : on MS-DOS or MS Windows
systems, and by , on VMS systems, just as for search paths.
-sFONTPATH=dir1;dir2;...
specifies a list of directories that will be scanned automatically
for fonts, overriding the GS_FONTPATH environment variable.
-sOutputFile=filename
selects an alternate output file (or pipe) for the initial output
device, as described above.
-sSUBSTFONT=fontname
causes the given font to be substituted for all unknown fonts,
instead of using the normal intelligent substitution algorithm.
Debugging switches
------------------
The -Z switch only applies if the interpreter was built for a
debugging configuration (DEBUG=1 or -DDEBUG selected at compile
time).
-A Fill empty storage with a distinctive bit pattern
for debugging. Equivalent to -Z@.
-A- Turn off -A, equivalent to -Z-@.
-E Turn on tracing of error returns from operators.
Equivalent to -Z#.
-E- Turn off -E, equivalent to -Z-#.
-Mn Force the interpreter's allocator to acquire additional
memory in units of nK, rather than the default (currently
20K on MS-DOS systems, 50K on Unix). n is a positive
decimal integer (not exceeding 63 on MS-DOS systems).
-Nn Allocate space for nK names, rather than the default
(normally 64K). n > 64 is only allowed if the interpreter
was compiled with EXTEND_NAMES defined.
-Zxxx Turn on debugging printout.
-Z-xxx Turn off debugging printout.
Each of the xxx characters selects an option.
Case is significant.
0 = garbage collector, minimal detail
1 = type 1 & type 42 font interpreter
2 = curve subdivider/rasterizer
3 = curve subdivider/rasterizer, detail
4 = garbage collector (strings)
5 = garbage collector (strings, detail)
6 = garbage collector (chunks, roots)
7 = garbage collector (objects)
8 = garbage collector (refs)
9 = garbage collector (pointers)
a = allocator (large blocks only)
A = allocator (all calls)
b = bitmap image processor
B = bitmap images, detail
c = color/halftone mapper
d = dictionary put/undef
D = dictionary lookups
e = external (OS-related) calls
f = fill algorithm (summary)
F = fill algorithm (detail)
g = gsave/grestore[all]
h = halftone renderer
H = halftones, every pixel
i = interpreter, just names
I = interpreter, everything
j = (Japanese) composite fonts
k = character cache & xfonts
K = character cache, every access
l = command lists, bands
L = command lists, everything
m = makefont and font cache
n = name lookup (new names only)
o = outliner (stroke)
O = stroke detail
p = band list paths
P = all paths
q = clipping
r = arc renderer
s = streams
S = scanner
t = tiling algorithm
u = undo saver (for save/restore), finalization
U = undo saver, more detail
v = rectangle fill
V = device-level output
w = compression encoder/decoder
x = transformations
y = Type 1 hints
Y = Type 1 hints, every access
z = trapezoid fill
# = operator error returns
% = externally processed comments
~ = math functions
The following switches select debugging options other than
printout.
$ = set unused parts of object references to
identifiable garbage values
+ = use minimum-size stack blocks
. = use small-memory table sizes even on
large-memory machines
? = validate pointers before, during and after GC,
also before and after save and restore
@ = fill newly allocated, garbage-collected, and
freed storage with a marker (a1, c1, and
f1 respectively)
********
******** Frequently Asked Questions
********
Q: The spacing of characters / words / margins on the display is
wrong, what can I do?
A: This is almost always caused by differences between the character
widths that were used to format the document and the character widths
of the fonts installed in your system. (This only affects the
display, and only with window systems, not with MS-DOS.) If this
happens, invoke Ghostscript with the -dNOPLATFONTS switch, or (on X
Windows) set
Ghostscript*useExternalFonts: false
in your X resource file.
For more information about fonts on the display, please read the
first sections of fonts.txt.
Q: On my H-P LaserJet, why do I only get a partial page of output, or a
single page gets split across two sheets?
A: Printing on a Hewlett-Packard LaserJet at full resolution (300 DPI)
requires a printer with at least 1.5 Mb of memory. 150 DPI printing
requires only .5 Mb. You can select 150 DPI printing with the command
line switch
-r150
(This is not necessary on DeskJet printers.)
Q: On my MS-DOS system using GS.EXE (Borland compiler), why do I get a
`limitcheck in setdevice' or `VMerror in setdevice' error message?
A: On MS-DOS systems using the Borland compiler, if Ghostscript gives you
a 'limitcheck in setdevice' error, it may mean Ghostscript's standard
buffer size wasn't large enough. Likewise, if Ghostscript gives you a
'VMerror in setdevice' error, it means the buffer size was too large. You
can use the -dBufferSpace= switch to set the buffer size to a different
value, e.g.,
-dBufferSpace=50000
The default value is 25000; the smallest value Ghostscript accepts is
10000; the largest valid value is 65000.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -