GS
Name
gs -- GhostScript (PostScript and PDF language interpreter)
SYNOPSIS
gs -h | --help
gs [ options ] ps-file [ [ options ] ps-file2 ] ...
DESCRIPTION
The gs command invokes Ghostscript, an interpreter of Adobe
Systems' PostScript(tm) and Portable Document Format (PDF)
languages. gs reads the files named by ps-file in sequence and
executes them as Ghostscript programs. After doing this, it reads
further input from the standard input stream (normally the
keyboard), interpreting each line separately. The interpreter
exits gracefully when it encounters the "quit" command (either in
a file or from the keyboard), at end-of-file, or at an interrupt
signal (such as Control-C at the keyboard).
Some of GhostScript's options are set via command-line options;
others are set as processing parameters, each of which consists of
a name and a value.
OPTIONS
-h --help | | Show GhostScript's help, as well as lists of the supported
input formats, supported devices, and the search path for gs
components.
|
-q | | Suppress normal startup messages, and also set the
processing parameter QUIET.
|
-c | | Begin interpreting arguments as PostScript code. All
following arguments are sent to the interpreter up to the
next argument beginning with "-" followed by a non-digit, or
with "@". This code is interpolated with the file list, so
files specified before -c are
interpreted beforehand, and files after
-c are interpreted afterwards.
|
-f | | Specifies a PostScript file to run as its argument. This is
equivalent to the ps-file arguments, but is useful for
terminating PostScript code as passed via
-c.
|
-d -D | | Set a processing parameter. The "name=value" pair follows
immediately after the option, as in "-Dfoo=bar". The values
here must be integers or the values "true" or "false". The
equals sign and value may be omitted; this is assumed to set
the name to "true".
|
-s -S | | Set a processing parameter to a string value. The
"name=value" pair follows immediately after the option, as
in "-Sfoo=bar".
|
-u | | Unset a processing parameter. The name to be unset follows
immediately after the option, as in "-ufoo".
|
-o | | Write rendered output to the named file, and also inhibit
pauses and the interactive shell. This is equivalent to
setting the processing parameters BATCH and NOPAUSE to true,
and OutputFile to the parameter after -o.
|
-r | | Set the device resolution. The resolution is specified as
two numbers separated with an "x", as in "300x150",
corresponding to the X and Y axis resolutions, respectively.
If a single number is given without an "x", it is treated as
the value for both resolutions.
This is equivalent to
setting DEVICEXRESOLUTION and DEVICEYRESOLUTION in
systemdict.
|
-g | | Set the device size, in pixels. The size is specified as
two numbers separated with an "x", as in "640x480",
corresponding to the width and height, respectively.
This is equivalent to setting DEVICEWIDTH and DEVICEHEIGHT
in systemdict.
|
RECOGNIZED PROCESSING PARAMETERS
Processing parameters may have arbitrary names; no limits are
placed on the settings that may be made. However, certain
settings have meaning to the gs interpreter, and drivers may use
other settings. Below is a list of recognized settings that the
gs interpreter must respect.
BATCH | | If set to true, do not enter an interactive shell after
processing all command-line files.
|
DEVICE | | Contains the name of the device used to render the page, as
a string.
The list of available devices can be discovered with the -h
parameter, as described above. At least the following
devices must be present: cups (CUPS Raster), ijs, pxlmono,
pxlcolor, and opvp (OpenPrinting Vector).
|
DEVICEHEIGHT | | Contains the height, in pixels, of the output device.
The effect of this setting when the current driver is a
vector driver is undefined.
|
DEVICEHEIGHTPOINTS | | Sets the initial page height, in units of 1/72 of an inch.
|
DEVICEWIDTH | | Contains the width, in pixels, of the output device.
The effect of this setting when the current driver is a
vector driver is undefined.
|
DEVICEWIDTHPOINTS | | Sets the initial page width, in units of 1/72 of an inch.
|
DEVICEXRESOLUTION | | Contains the resolution, in pixels per inch, of the X
dimension (horizontal) of the output device.
|
DEVICEYRESOLUTION | | Contains the resolution, in pixels per inch, of the Y
dimension (vertical) of the output device.
|
NOPAUSE | | If set to true, disable the prompt and pause normally
displayed after rendering a page.
|
OutputFile | | Contains the path to the file to which gs should write its
output, as a string. This parameter may be set to '-', in
which case gs's output is sent to standard output.
|
PAPERSIZE | | Contains the string representation of the paper size. The
ISO paper sizes a0-a10 (plus a4small), isob0-isob6, and
c0-c6 are recognized, as are jisb0-jisb6 (JIS standard
sizes) and the US paper sizes 11x17, ledger, legal, letter,
lettersmall, and archA-archE.
|
QUIET | | If set to true, suppress routine information comments on
standard output.
|
SAFER | | If set to true, disable several unsafe PostScript features:
the deletefile and renamefile operators, piped commands,
reading or writing to general files, and changing of certain
system settings.
|
STRICT | | If set to true, disable as many extensions to the Adobe
PostScript specification as possible.
|
EXIT STATUS
gs returns 0 on successful execution. Any other return value
indicates an error.
AUTHOR
Jeff Licquia (licquia@linux-foundation.org)
wrote this man page for the LSB specification.
Portions of this page were taken from the GhostScript
documentation. The maintainer and rights holder for GhostScript
is Artifex Software, Inc.