📄 language.txt
字号:
Creates a filter that decodes data in .PFB format, the
usual semi-binary representation for Type 1 font files
on IBM PC and compatible systems. If hex_boolean is true,
binary packets are converted to hex; if false, binary
packets are not converted.
<target> <dict> /PixelDifferenceEncode filter <file>
<source> <dict> /PixelDifferenceDecode filter <file>
Implements the Predictor=2 pixel-differencing option of the
LZW filters. Recognized keys are:
Colors <integer> 1..4 (default=1)
BitsPerComponent <integer> 1,2,4,8 (default=8)
Columns <integer> >= 0 (required)
See the Adobe "Portable Document Format Reference Manual"
for details.
<target> <dict> /PNGPredictorEncode filter <file>
<source> <dict> /PNGPredictorDecode filter <file>
Implements the "filter" algorithms of the PNG graphics
format. Recognized keys are:
Colors <integer> 1..16 (default=1)
BitsPerComponent <integer> 1,2,4,8,16 (default=8)
Columns <integer> >= 0 (default=1)
Predictor <integer> 10..15 (default=15)
The Predictor is the PNG algorithm number + 10 for the
Encoding filter; the Decoding filter ignores Predictor.
15 means the encoder attempts to optimize the choice of
algorithm. For more details, see libpng.mak, which has
a pointer to the PNG specification.
<target> /TBCPEncode filter <file>
<source> /TBCPDecode filter <file>
Create filters that implement the Adobe Tagged Binary
Communications Protocol. See Adobe documentation for
details.
<target> /zlibEncode filter <file>
<source> /zlibEncode filter <file>
Creates filters that use the zlib data compression method
(the same method used by the gzip application).
This filter is only available if the fzlib feature was
selected when Ghostscript was compiled and linked.
Various versions of Ghostscript may also support other non-standard filters
for experimental purposes. The current version includes the following
non-standard filters, which are not documented further. No guarantee is
made that these filters will exist in compatible form, or at all, in future
versions.
<target/source> <string> ByteTranslateEncode/Decode
<target> <int> BigStringEncode
<target/source> <dict> BoundedHuffmanEncode/Decode
FirstBitLowOrder <bool> false
MaxCodeLength <int> 16
EndOfData <bool> true
EncodeZeroRuns <int> 256
Tables <int_array>
<target/source> <dict> BWBlockSortEncode/Decode
BlockSize <int> 16384
<target/source> MoveToFrontEncode/Decode
Ghostscript also supports additional keys in the optional dictionary
operands for some filters. For the LZWDecode filter:
InitialCodeLength <integer>
An integer between 2 and 11 specifying the initial number
of data bits per code. Note that the actual initial code length is 1
greater than this, to allow for the reset and end-of-data code values.
Default value: 8.
FirstBitLowOrder <boolean>
If true, codes appear with their low-order bit first.
Default value: false.
BlockData <boolean>
If true, the data is broken into blocks in the manner
specified for the GIF file format. Default value: false.
For the CCITTFaxEncode and CCITTFaxDecode filters:
DecodedByteAlign <integer>
An integer N with the value 1, 2, 4, 8, or 16, specifying
that decoded data scan lines are always a multiple of N bytes. The encoding
filter skips data in each scan line from Columns to the next multiple of N
bytes; the decoding filter pads each scan line to a multiple of N bytes.
Default value: 1.
Virtual memory operators
------------------------
<save> .forgetsave -
Cancels the effect of a save -- makes it as though the
save never happened.
Miscellaneous operators
-----------------------
<string> getenv <string> true
<string> getenv false
Looks up a name in the shell environment. If the name is
found, returns the corresponding value and true; if the
name is not found, returns false.
<name> <array> makeoperator <operator>
Constructs and returns a new operator that is actually the
given procedure in disguise. The name is only used for
printing. The operator has the executable attribute.
<string> <boolean> .setdebug -
If the Ghostscript interpreter was built with the DEBUG
flag set, sets or resets any subset of the debugging
flags normally controlled by -Z in the command line.
Has no effect otherwise.
- .oserrno <errno>
Returns the error code for the most recent OS error.
- .oserror <string>
Returns the error string for the most recent OS error.
Device operators
----------------
<device> copydevice <device>
Copies a device. The copy is writable and installable.
<index> .getdevice <device>
Returns a device from the set of devices known to the
system. The first device, which is default, is numbered
0. If the index is out of range, causes a rangecheck
error. This device is actually a prototype, not a
directly usable device, and is marked read-only;
it cannot have its parameters changed or be installed as
the current device.
<matrix> <width> <height> <palette> makeimagedevice <device>
Makes a new device that accumulates an image in memory.
matrix is the initial transformation matrix: it must be
orthogonal (i.e., [a 0 0 b x y] or [0 a b 0 x y]).
palette is a string of 2^N or 3*2^N elements, specifying
how the 2^N possible pixel values will be interpreted.
Each element is interpreted as a gray value, or as RGB
values, multiplied by 255. For example, if you want
a monochrome image for which 0=white and 1=black, the
palette should be <ff 00>; if you want a 3-bit deep
image with just the primary colors and their complements
(ignoring the fact that 3-bit images are not supported),
the palette might be <000000 0000ff 00ff00 00ffff
ff0000 ff00ff ffff00 ffffff>. At present, the palette
must contain exactly 2, 4, 16, or 256 entries,
and must contain an entry for black and an entry
for white; if it contains any entries that aren't black,
white, or gray, it must contain at least the six primary
colors (red, green, blue, and their complements cyan,
magenta, and yellow); aside from this, its contents are
arbitrary.
Alternatively, palette can be 16, 24, 32, or null
(equivalent to 24). These are interpreted as:
16 = 5R, 6G, 5B bits;
24 = 8R, 8G, 8B bits;
32 = 8C, 8M, 8Y, 8K bits.
Note that one can also make an image device (with the same
palette as an existing image device) by copying a device
using the copydevice operator.
<matrix> <width> <height> <palette> <word?> makewordimagedevice
<device>
Makes an image device as described above. word? is a
Boolean value indicating whether the data should be stored
in a word-oriented format internally. No ordinary
PostScript programs should use this operator.
<device> <index> <string> copyscanlines <substring>
Copies one or more scan lines from an image device into a
string, starting at a given scan line in the image.
The data is in the same format as for the image
operator. Error if the device is not an image device or
if the string is too small to hold at least one complete
scan line. Always copies an integral number of scan
lines.
<device> setdevice -
Sets the current device to the specified device. Also
resets the transformation and clipping path to the
initial values for the device. Signals an invalidaccess
error if the device is a prototype.
- currentdevice <device>
Gets the current device from the graphics state.
<device> getdeviceprops <mark> <name1> <value1> ... <namen> <valuen>
Gets all the properties of a device. Currently defined
names and values for all devices are:
BitsPerPixel <integer>
Usually read-only. Number of bits per pixel.
.HWMargins [<4 floats>]
Size of non-imageable regions around edges
of page, in 1/72" units.
HWSize [<integer> <integer>]
X and Y size in pixels.
Name <string>
Read-only. The device name.
Currently, same as OutputDevice.
Colors, GrayValues, RedValues, GreenValues,
BlueValues, ColorValues
As for the 'deviceinfo' operator of
Display PostScript.
TextAlphaBits, GraphicsAlphaBits
The number of bits of anti-aliasing
information for text or graphics
respectively. Legal values are 1 (no
anti-aliasing), 2, or 4; the default value
for most devices is 1. Read-only for
almost all devices.
In addition, the following are defined per Adobe's
documentation for the setpagedevice operator:
Duplex (if supported)
HWResolution
ImagingBBox
Margins
NumCopies (for printers only)
Orientation (if supported)
OutputDevice
PageOffset (write-only)
PageSize
ProcessColorModel
Some devices may only allow certain values for
HWResolution and PageSize. The null device ignores
attempts to set PageSize; its size is always [0 0].
Red/Green/Blue/ColorValues are only defined if Colors > 1.
For printers, the following are also defined:
BufferSpace <integer>
Buffer space for band lists, if the bitmap
is too big to fit in RAM.
MaxBitmap <integer>
Maximum space for a full bitmap in RAM.
OutputFile <string>
() means send to printer directly,
otherwise specifies the file name for
output; a %d is replaced by the page #;
on Unix systems, (|command) writes to a pipe
OpenOutputFile <boolean>
If true, open the device's output file
when the device is opened, rather than
waiting until the first page is ready to
print.
PageCount <integer>
Read-only. Counts the number of pages
printed on the device.
<mark> <name1> <value1> ... <namen> <valuen> <device>
putdeviceprops <device>
Sets properties of a device. May cause undefined,
typecheck, rangecheck, or limitcheck errors.
- flushpage -
On displays, flushes any buffered output, so that it
is guaranteed to show up on the screen; on printers,
has no effect.
Ghostscript supports the following page device parameters in addition to the
ones documented by Adobe and the ones described under getdeviceprops above:
ViewerPreProcess procedure
Specifies a procedure to be applied to the page device
dictionary before any other processing is done. The
procedure may not alter the dictionary, but it may return
a modified copy. This "hook" is provided for use by
viewing programs.
Character operators
-------------------
<string> <bool> .charboxpath -
For each character C in the rendering of <string>, let the
bounding box of C *in device space* be the four
*user-space* points p1x/y, p2x/y, p3x/y, and p4x/y. For
each character in order, .charboxpath appends the
following to the current path:
- If <bool> is true, the equivalent of:
p1x p1y moveto
p2x p2y lineto
p3x p3y lineto
p4x p4y lineto
closepath
- If <bool> is false, the equivalent of:
p1x p1y moveto
p3x p3y lineto
In either case, this creates a path whose pathbbox is the
bbox of the string.
<font> <charname|charcode> <charname> <charstring> .type1execchar -
Does all the work for rendering a Type 1 outline. This
operator, like setcharwidth and setcachedevice, is
only valid in the context of a show operator -- i.e.,
it must only be called from within a BuildChar or
BuildGlyph procedure.
<font> <charcode> %Type1BuildChar -
This is not a new operator: rather, it is a name known
specially to the interpreter. Whenever the interpreter
needs to render a character (during a ...show,
stringwidth, or charpath), it looks up the name
BuildChar in the font dictionary to find a procedure to
run. If it does not find this name, and if the FontType
is 1, the interpreter instead uses the value (looked up
on the dictionary stack in the usual way) of the name
%Type1BuildChar.
The standard definition of %Type1BuildChar is in gs_type1.ps.
Users should not need to redefine %Type1BuildChar, except
perhaps for tracing or debugging.
<font> <charname> %Type1BuildGlyph -
Provides the Type 1 implementation of BuildGlyph.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PostScript is a trademark of Adobe Systems, Incorporated.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -