How to install Ghostscript

Table of contents

For other information, see the Ghostscript overview and "How to build Ghostscript from source code".


Overview of how to install Ghostscript

You must have three things to run Ghostscript:

  1. The Ghostscript executable file; on some operating systems, more than one file is required. These are entirely platform-specific. See below for details.
  2. Initialization files that Ghostscript reads in when it starts up; these are the same on all platforms.
  3. Fonts, for rendering text. These are platform-independent, but if you already have fonts of the right kind on your platform, you may be able to use those. See below for details. Also see the documentation on fonts.

The usage documentation describes the search algorithms used to find initialization files and font files. The per-platform descriptions that follow tell you where to install these files.


Installing Ghostscript on Unix

You need the file gs to run Ghostscript on Unix, and installing Ghostscript on a Unix system requires building it first: please read how to build Ghostscript on Unix in the documentation on building Ghostscript, especially regarding how to decide which makefile to use and how you may need to edit it. After building, execute "make install" to install the executable and all the required and ancillary files.

The makefile installs all the files except fonts under the directory defined in the makefile as "prefix", /usr/local by default. The fonts should be installed in {prefix}/share/ghostscript/fonts. Consult the makefile for more details. If you have Adobe Acrobat installed, you can use the Acrobat fonts in place of the ones provided with Ghostscript by adding the Acrobat fonts directory to GS_FONTPATH and removing these fonts from Fontmap.GS:

Courier, Courier-Bold, Courier-BoldOblique, Courier-Oblique, Helvetica, Helvetica-Bold, Helvetica-BoldOblique, Helvetica-Oblique, Symbol, Times-Bold, Times-BoldItalic, Times-Italic, Times-Roman, ZapfDingbats

Additional notes on Linux

Red Hat Linux 6 and later installs the Ghostscript base 35 fonts in /usr/share/fonts/default/Type1, and the other Ghostscript fonts in /usr/share/fonts/default/ghostscript.

For Linux, you may be able to install or upgrade Ghostscript from precompiled RPM files using:

rpm -U ghostscript-N.NN-1.i386.rpm
rpm -U ghostscript-fonts-N.NN-1.noarch.rpm

However, please note that we do not create RPMs for Ghostscript, and we take no responsibility for RPMs created by others.


Installing Ghostscript on MS Windows

We usually distribute Ghostscript releases for Windows as self-extracting archive files, since this is the most convenient form for users. However, we or other parties may distribute releases in the form of plain zip archives.

The self-extracting archive is normally named gs###w32.exe, where ### is the release number (e.g., 403 for Ghostscript 4.03, 600 for Ghostscript 6.0).

The zip archive is normally named gs###w32.zip, where ### is the release number (e.g., 403 for Ghostscript 4.03, 600 for Ghostscript 6.0).

Only one of gs###w32.exe or gs###w32.zip is required.

Windows 95/98 and NT 4

To install a self-extracting Ghostscript archive on Windows 95/98 or Windows NT4/2000, you need just this self-extracting archive file. Run this file to install Ghostscript.

Alternatively, if you have the zip file, unzip it to a temporary directory then run the included setupgs.exe. After the setup program has finished, remove the temporary files.

After installing Ghostscript, it is strongly recommended that you install the GSview previewer, which provides an easier to use graphical interface for Ghostscript. Information on GSview is available from:

http://www.cs.wisc.edu/~ghost/gsview/

Win32s (Windows 3.1) and Windows NT 3.5

To install Ghostscript on Win32s (partial 32-bit environment under MS Windows 3.1), or Windows NT 3.5 you need the same archive file. However, the self extracting archive will not automatically run and install the Ghostscript. You must manually unzip this archive and install it. To install Ghostscript, execute the following commands in a Command Prompt window (replacing ### with the release number):

c:
mkdir \gs
cd \gs
ftp get gs###w32.zip
unzip gs###w32.zip
If the file is named .zip and not .exe, unzip it using
unzip gs###w32.zip

After unpacking the archive, create a shortcut to

c:\gs\gs#.#\bin\gswin32.exe

If you place Ghostscript in a different directory, you will need to set GS_LIB or use the command line option -I. See Use.htm for details.

General Windows configuration

The archive includes files in these subdirectories:

gs#.#\bin
gs#.#\lib
gs#.#\examples
gs#.#\doc
fonts

Note that the subdirectory is only #.#, not #.##, if the release number ends in 00. E.g., for release 6.0, ### is 600, but #.# is 6.0.

The actual executable files, in the gs#.#\bin subdirectory, are:

GS16SPL.EXE     Print spooler for Win32s (Windows 3.1) only; must be in the same directory as GSWIN32.EXE
GSWIN32.EXE   32-bit Ghostscript using windows
GSWIN32C.EXE   32-bit Ghostscript using only the command line
GSDLL32.DLL   32-bit dynamic link library containing most of Ghostscript's functionality

See "Installing Ghostscript on DOS" below for information about using Adobe Type Manager, Adobe Type Basics, or Adobe Acrobat fonts. If your system uses TrueType fonts, you can get them converted to a Ghostscript-compatible format at the time you select your "printer" by doing the following:

  1. Open control panel and double-click on the "Printers" icon.
  2. Select your Postscript printer.
  3. Choose Setup.
  4. Choose Options.
  5. Choose Advanced.
  6. At the top of the dialog box you will see TrueType Fonts Send to Printer As: Choose (drop-down menu) Adobe Type 1.
  7. Uncheck Use Printer Fonts for All TrueType Fonts and Use Substitution Table.
  8. OK.
  9. OK etc.

That's it! Your TrueType fonts will automatically be downloaded in your PostScript file for Ghostscript to use.

For printer devices, the default output is:

The default printer     Win95 or WinNT
Prompt for a printer port   Win32s (Windows 3.1)

This can be modified as follows.

-sOutputFile="LPT1:"
Output to the named port.
-sOutputFile="%printer%printer name" (Windows 95, 98, NT or 2000)
Output to the named printer. If your printer is named "HP DeskJet 500" then you would use -sOutputFile="%printer%HP DeskJet 500".
-sOutputFile="\\spool\printer name" (Windows 3.1/Win32s)
Output to the named printer. Note that this is NOT a UNC name.

If Ghostscript fails to find an environment variable, it looks for a registry value of the same name under the key

HKEY_CURRENT_USER\Software\AFPL Ghostscript\#.##

or if that fails, under the key

HKEY_LOCAL_MACHINE\SOFTWARE\AFPL Ghostscript\#.##

where #.## is the Ghostscript version number. This does not work under Win32s (that is, Windows 3.1, which doesn't support named registry values).

Ghostscript will attempt to load the Ghostscript dynamic link library GSDLL32.DLL in the following order: