home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 4
/
FreshFish_May-June1994.bin
/
gnu
/
lib
/
ghostscript
/
doc
/
use.doc
< prev
next >
Wrap
Text File
|
1994-02-22
|
25KB
|
679 lines
Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved.
This file is part of Ghostscript.
Ghostscript is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY. No author or distributor accepts responsibility
to anyone for the consequences of using it or for whether it serves any
particular purpose or works at all, unless he says so in writing. Refer
to the Ghostscript General Public License for full details.
Everyone is granted permission to copy, modify and redistribute
Ghostscript, but only under the conditions described in the Ghostscript
General Public License. A copy of this license is supposed to have been
given to you along with Ghostscript so you can know your rights and
responsibilities. It should be in a file named COPYING. Among other
things, the copyright notice and this notice must be preserved on all
copies.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This file, use.doc, describes how to use the Ghostscript language
interpreter.
For an overview of Ghostscript and a list of the documentation files, see
README.
********
******** How to install Ghostscript ********
********
To run Ghostscript, you need the executable program, and also some
external initialization files:
gs_*.ps (gs_dps1.ps, gs_fonts.ps, gs_init.ps, gs_lev2.ps,
gs_statd.ps, gs_dbt_e.ps, gs_sym_e.ps)
uglyr.gsf
Fontmap
The file name of the executable program depends on the environment;
see the instructions for the specific platforms below.
The Ghostscript fileset includes a set of fonts (.gsf files); you
should have them on line as well.
VMS
---
Installing Ghostscript on a VMS system requires compiling it first.
The name of the executable is GS.EXE.
You should install all the files, including the fonts, in the same
directory as the executable and initialization files. By default,
this is the directory in which you did the compilation. Consult the
command file (VMS-CC.MAK or VMS-GCC.MAK) for more details.
If you have DECWindows/Motif installed, you may wish to replace the
FONTMAP file with the file FONTMAP.VMS. Read the comment at the
beginning of the latter file for more information.
MS-DOS
------
There are two MS-DOS executables in the standard Ghostscript
distribution:
- GS.EXE runs on any MS-DOS machine, but is limited to 640K.
- GS386.EXE runs on any 386 or 486 machine, and will use all
available extended (not expanded) memory.
You should install all the files except the fonts in C:\GS, and the
fonts in C:\GS\FONTS.
If you have Adobe Type Manager fonts installed on your system, and you
wish to use them with Ghostscript, you may wish to replace the FONTMAP
file with FONTMAP.ATM, and to add to the environment variable GS_LIB the
name of the directory where the fonts are located (see below for more
information about GS_LIB). Before you do this, please read carefully the
license that accompanies the ATM fonts; Aladdin Enterprises takes no
responsibility for any possible violations of such licenses.
MS Windows
----------
The name of the executable is GSWIN.EXE. Ghostscript requires Windows
3.1, and you must run Windows in 386 Enhanced or Standard (not Real) mode.
Since Ghostscript is a large program, you will need to run Windows in
Enhanced mode (so that it can provide virtual memory) unless you have at
least 6 Mb of RAM.
You should install all the files except the fonts in C:\GS, and the
fonts in C:\GS\FONTS.
See under "MS-DOS" above for information about using Adobe Type
Manager fonts with Ghostscript.
OS/2 2.0
--------
Ghostscript currently only runs in an OS/2 DOS Box. Please read the
MS-DOS notes, since they apply to this environment as well.
If you run GS386 in the OS/2 2.0 DOS Box, you must select the
"ENABLED" setting for the DPMI_DOS_API option of the DOS Box. GS386
will not run with the "AUTO" setting.
Unix
----
Installing Ghostscript on a Unix system requires compiling it first.
The name of the executable is gs. The makefile installs all the
files, except the fonts, in /gnu or various subdirectories
thereof. The fonts should be installed in
/gnu/lib/ghostscript/fonts. Consult the makefile for more
details.
********
******** Shell scripts for Ghostscript
********
The Ghostscript distribution includes several Unix shell scripts for
driving Ghostscript in different environments. These are all
user-contributed code: please contact the user identified in the file, not
Aladdin Enterprises, if you have questions.
> pv.sh - preview a specified page of a dvi file in an X window.
> sysvlp.sh - System V 3.2 lp interface for parallel printer.
> pj-gs.sh - printing on an H-P PaintJet under HP-UX.
> unix-lpr.sh - queue filter for lpr under Unix.
> lprsetup.sh - setup for unix-lpr.sh.
If one of these serves your needs, you may be able to skip most of
the rest of this document.
********
******** How to use the Ghostscript interpreter ********
********
To invoke the interpreter, give the command
gs <filename1> ... <filenameN>
The interpreter will read in the files in sequence and execute them.
After doing this, it reads further input from the primary input stream
(normally the keyboard). Each line (i.e. characters up to a <return>) is
interpreted separately. To exit from the interpreter, type quit<return>.
The interpreter also exits gracefully if it encounters end-of-file.
Typing the interrupt character, e.g., control-C, is also safe.
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
gs -h
or
gs -?
This message also lists the available devices. For a little more
information, a one-line description of each device appears near the
beginning of the file devs.mak.
Choosing the output device
--------------------------
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=xyz
in 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.ps
instead of just
gs myfile.ps
Alternatively, you can type
(epson) selectdevice
(myfile.ps) run
All 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) selectdevice
or
(epson) selectdevice
As 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 -r60x72
and the highest-density mode with
gs -sDEVICE=epson -r240x72.
On a 24-pin printer, the lowest density is
gs -sDEVICE=epson -r60x60
and the highest-density 24-pin mode is
gs -sDEVICE=epson -r360x180
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 the printer (PRN) on MS-DOS systems, and to a scratch file on
Unix or VMS systems. To send the output to a series of files foo1.xyz,
foo2.xyz, ..., use the switch
-sOutputFile=foo%d.xyz
(For compatibility with older versions of Ghostscript, -sOUTPUTFILE=
also works.) The %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