Install.htm 17.9 KB
Newer Older
1
<!doctype html>
2 3
<html>
<head>
4 5 6 7 8 9 10 11
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-54391264-2"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-54391264-2');
12
</script>
13 14 15
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro" rel="stylesheet">
16
<link rel="shortcut icon" type="image/png" href="../../images/favicon.png">
17
<title>How to Install Ghostscript</title>
18
    <!-- Originally: install.txt -->
19 20
<link href="style.css" rel="stylesheet" type="text/css">
<link href="gs-style.css" rel="stylesheet" type="text/css">
21 22 23
</head>

<body>
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45

    <div class="header">
    <div class="row">
        <div class="col-lt-6 logo"><a href="https://www.ghostscript.com/"><img src="images/ghostscript_logo.png" width="108" height="119" alt=""></a></div>
        <div class="col-6"><div class="row"><div class="artifexlogo"><a href="https://artifex.com" target="_blank"><img src="images/Artifex_logo.png" width="194" height="40" alt=""></a></div>
        <div class="col-12"><div class="button button1"><a href="https://artifex.com/contact-us/" title="Contact Us" target="_blank">Contact Us</a></div>
        <div class="button button2 hidden-xs"><a href="https://www.ghostscript.com/download.html" title="Download">Download</a></div></div></div>
    </div>
    </div>
    </div>

    <div class="banner">
    <div class="row">
        <div class="col-12">How to Install Ghostscript</div>
    </div>
    </div>

    <div class="main">
    <div class="row">
    <div id="sidebar">
    <div class="sidebar-item"></div>
    <div class="col-2 leftnav">
46
<ul>
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
            <li><a href="https://www.ghostscript.com/">Home</a></li>
            <li><a href="https://www.ghostscript.com/license.html">Licensing</a></li>
            <li><a href="https://www.ghostscript.com/releases.html">Releases</a></li>
            <li><a href="https://www.ghostscript.com/release_history.html">Release History</a></li>
            <li><a href="https://www.ghostscript.com/documentation.html" title="Documentation">Documentation</a></li>
            <li><a href="https://www.ghostscript.com/download.html" title="Download">Download</a></li>
            <li><a href="https://www.ghostscript.com/performance.html" title="Performance">Performance</a></li>
            <li><a href="http://jbig2dec.com/" title="jbig2dec">jbig2dec</a></li>
            <li><a href="http://git.ghostscript.com/?p=ghostpdl.git;a=summary">Source</a></li>
            <li><a href="http://bugs.ghostscript.com/">Bugs</a></li>
            <li><a href="https://www.ghostscript.com/faq.html" title="FAQ">FAQ</a></li>
        </ul>
    </div>
    </div>
    <div class="col-10 page">

63
<!--START EDITING HERE-->
64 65 66 67

<h2>Table of contents</h2>

<blockquote><ul>
68 69
<li><a href="#Overview">Overview of how to install Ghostscript</a></li>
<li><a href="#Install_Unix">Installing Ghostscript on Unix</a></li>
70
<ul>
71 72
<li><a href="#Shared_object">Ghostscript as a shared object</a></li>
<li><a href="#Install_Linux">Additional notes on Linux</a></li>
73
</ul>
74 75
<li><a href="#Install_Windows">Installing Ghostscript on MS Windows</a></li>
<li><a href="#Install_VMS">Installing Ghostscript on OpenVMS</a></li>
76 77 78 79 80 81 82 83
</ul></blockquote>

<!-- [1.2 end table of contents] =========================================== -->

<!-- [1.3 begin hint] ====================================================== -->

<p>For other information, see the <a href="Readme.htm">Ghostscript
overview</a> and "<a href="Make.htm">How to build Ghostscript from source
84
    code</a>".</p>
85 86 87 88 89 90 91 92 93 94 95 96

<!-- [1.3 end hint] ======================================================== -->

<hr>

<!-- [1.0 end visible header] ============================================== -->

<!-- [2.0 begin contents] ================================================== -->

<h2><a name="Overview"></a>Overview of how to install Ghostscript</h2>

<p>
97
    You must have three things to run Ghostscript:</p>
98 99 100
<ol>
<li>The Ghostscript executable file; on some operating
systems, more than one file is required.  These are entirely
101
platform-specific.  See below for details.</li>
102 103

<li>Initialization files that Ghostscript reads in when it
104
starts up; these are the same on all platforms.</li>
105
<ul>
106
<li><code>gs_</code>*<code>.ps</code> unless Ghostscript was compiled
107
using the "compiled initialization files" option.  See the documentation of
108
<a href="Psfiles.htm">PostScript files distributed with Ghostscript</a>.</li>
109

110
<li><code>pdf_</code>*<code>.ps</code> if Ghostscript was compiled
111 112
with the ability to interpret Adobe Portable Document Format (PDF) files,
that is, <code>pdf.dev</code> was included in
113
<code>FEATURE_DEVS</code> when Ghostscript was built.</li>
114

115
<li><code>Fontmap</code> and <code>Fontmap.GS</code> (or the
116 117
appropriate <code>Fontmap.</code><em>xxx</em> for your platform), unless
you plan always to invoke Ghostscript with the <a
118
href="Use.htm#FONTMAP_switch"><code>-dNOFONTMAP</code> switch</a>.</li>
119 120 121 122 123
</ul>

<li>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
124
<a href="Fonts.htm">documentation on fonts</a>.</li>
125 126 127 128 129 130
</ol>

<p>
The <a href="Use.htm">usage documentation</a> describes the search
algorithms used to find initialization files and font files.  The
per-platform descriptions that follow tell you where to install these
131
files.</p>
132 133 134 135 136 137

<hr>

<h2><a name="Install_Unix"></a>Installing Ghostscript on Unix</h2>

<p>
138
Ghostscript uses the common configure, build and install method common
139
to many modern software packages. In general the following with suffice
140
    to build ghostscript:</p>
141
<blockquote><code>
142 143
    ./configure<br>
    make
144 145 146
</code></blockquote>
and then it may be installed in the default location with:
<blockquote><b>
147 148
    <code>make install</code>
</b></blockquote>
149
<p>This last command may need to be performed with super user privileges.</p>
150 151

<p>
152 153 154
You can set the installation directory by adding <code>--prefix=<em>path</em></code>
to the configure invocation in the first step. The default prefix is <code>/usr/local</code>,
which is to say the <tt>gs</tt> executable is installed as <code>/usr/local/bin/gs</code>.</p>
155

156
<p>A list of similar configuration options is available via <code>./configure --help</code></p>
157 158 159 160 161 162 163 164

<p>
For more detailed information on building Ghostscript see
<a href="Make.htm#Unix_build">how to build Ghostscript on Unix</a> in
the documentation on building Ghostscript, especially regarding information
on using the older <a href="Make.htm#UNIX_makefile">hand edited makefile</a>
approach. Whatever configuration method you use, execute "<code>make
install</code>" to install the executable and all the required and
165
    ancillary files after the build is complete.</p>
166 167 168 169 170 171 172

<h3><a name="Use_Acrobat_fonts_Unix"></a>Fonts</h3>

<p>
The makefile installs all the files except fonts under the directory
defined in the makefile as <code>prefix</code>. Fonts need to be
installed separately. The fonts should be installed in
173 174 175
<code><em>{prefix}</em>/share/ghostscript/fonts</code>.
(That is, <code>/usr/local/share/ghostscript/fonts/</code> if you used the default
configuration above.)</p>
176 177

<p>
178 179
If you have Adobe Acrobat installed, you can use the Acrobat fonts
in place of the ones distributed with with Ghostscript by adding the
180 181
Acrobat fonts directory to
<code>GS_FONTPATH</code> and removing these fonts from
182
    <code>Fontmap.GS</code>:</p>
183 184 185 186 187 188 189 190 191 192 193

<blockquote>
Courier, Courier-Bold, Courier-BoldOblique, Courier-Oblique, Helvetica,
Helvetica-Bold, Helvetica-BoldOblique, Helvetica-Oblique, Symbol, Times-Bold,
Times-BoldItalic, Times-Italic, Times-Roman, ZapfDingbats
</blockquote>

<p>
Similarly, you can have ghostscript use other fonts on your system by adding
entries to the fontmap or adding the directories to the GS_FONTMAP environment
variable. See the <a href="Use.htm#Font_lookup">usage documentation</a> for more
194
information.</p>
195
<p>For example, many linux distributions place fonts under <code>/usr/share/fonts</code>.</p>
196 197

<h3><a name="Shared_object"></a>Ghostscript as a shared object</h3>
198 199
<p>If you've built Ghostscript as a shared object, instead of '<code>make install</code>',
you must use '<code>make soinstall</code>'.
200
See <a href="Make.htm#Shared_object">how to build Ghostscript
201
as a shared object</a> for more details.</p>
202 203 204 205 206

<h3><a name="Install_Linux"></a>Additional notes on Linux</h3>

<p>
For Linux, you may be able to install or upgrade Ghostscript from
207
    precompiled <a href="http://www.rpm.org">RPM</a> files using:</p>
208 209 210 211 212 213 214 215

<blockquote><code>
rpm -U ghostscript-N.NN-1.i386.rpm<br>
rpm -U ghostscript-fonts-N.NN-1.noarch.rpm
</code></blockquote>

<p>
However, please note that we do not create RPMs for Ghostscript, and we take
216
no responsibility for RPMs created by others.</p>
217 218 219 220 221 222

<hr>

<h2><a name="Install_Windows"></a>Installing Ghostscript on MS Windows</h2>

<p>
223
We usually distribute Ghostscript releases for Windows as a binary installer,
224
    for the convenience of most users.</p>
225 226 227

<h4><a name="Windows16"></a>Windows 3.1 (16-bit)</h4>
<p>
228
    The last version to run on 16-bit Windows 3.1 was Ghostscript 4.03.</p>
229

230
<h4><a name="Windows32"></a>Windows 95, 98, Me</h4>
231
<p>
232
The last version to be available as a binary for Windows 95/98/Me was 8.60. Although
233
building from source with Visual Studio 2003 should produce a working binary for those
234
versions.</p>
235 236 237 238

<h4><a name="Windows32"></a>Windows NT4, 2000, XP, 2003 or Vista (32-bit)</h4>
<p>
The installer is normally named
239
<code>gs###w32.exe</code>,
240 241
where ### is the release number (e.g., 871 for Ghostscript 8.71,
    910 for Ghostscript 9.10).</p>
242 243 244

<h4><a name="Windows64"></a>Windows XP x64 edition, 2003 or Vista (64-bit)</h4>
<p>
245
The x64 installer is normally named
246 247
<code>gs###w64.exe</code>
This is for 64-bit Windows operating systems based on the x64 instruction set.
248
Do not use this on 64-bit processors running 32-bit Windows.</p>
249 250 251

<h3><a name="Windows4"></a>Installing</h3>
<p>
252
    To install Ghostscript on Windows, you should run the installer executable.</p>
253

254
<p>The installer is NSIS-based (see also <a href="Release.htm">Release.htm</a>) and
255 256 257 258
supports a few standard NSIS options: <code>/NCRC</code> disables the CRC check,
<code>/S</code> runs the installer or uninstaller silently, <code>/D</code>
sets the default installation directory (It must be the last parameter
used in the command line and must not contain any quotes, even if the path
259
contains spaces. Only absolute paths are supported).</p>
260 261 262 263

<h3><a name="General_Windows"></a>General Windows configuration</h3>

<p>
264
The installer includes files in these subdirectories:</p>
265 266 267 268 269 270 271 272 273 274 275

<blockquote><code>
gs<em>#.##</em>\bin
<br>gs<em>#.##</em>\examples
<br>gs<em>#.##</em>\lib
<br>gs<em>#.##</em>\doc
<br>gs<em>#.##</em>\Resource
<br>fonts
</code></blockquote>

<p>
276
The actual executable files for the 32-bit Windows install, in the <code>gs<em>#.##</em>\bin</code>
277
subdirectory, are:</p>
278

279 280
<blockquote><table>
<tr><td><code>GSWIN32C.EXE</code></td>
281 282 283
    <td>&nbsp;</td>
    <td>Ghostscript as a 32-bit Windows command line program.
        This is usually the preferred executable.</td></tr>
284
<tr><td><code>GSWIN32.EXE</code></td>
285 286
        <td>&nbsp;</td>
        <td>32-bit Ghostscript using its own window for commands</td></tr>
287
<tr><td><code>GSDLL32.DLL</code></td>
288 289
    <td>&nbsp;</td>
    <td>32-bit dynamic link library containing most of Ghostscript's functionality</td></tr>
290 291
</table></blockquote>

292 293
<p>
For the 64-bit Windows install, also in the <code>gs<em>#.##</em>\bin</code>
294
    subdirectory, they are:</p>
295

296 297
<blockquote><table>
<tr><td><code>GSWIN64C.EXE</code></td>
298 299 300
    <td>&nbsp;</td>
    <td>Ghostscript as a 64-bit Windows command line program.
        This is usually the preferred executable.</td></tr>
301
<tr><td><code>GSWIN64.EXE</code></td>
302 303
        <td>&nbsp;</td>
    <td>64-bit Ghostscript using its own window for commands</td></tr>
304
<tr><td><code>GSDLL64.DLL</code></td>
305 306
    <td>&nbsp;</td>
    <td>64-bit dynamic link library containing most of Ghostscript's functionality</td></tr>
307 308
</table></blockquote>

309
<p>
310
For printer devices, the default output is the default printer. This can be modified as follows:</p>
311 312 313 314 315

<blockquote>
<dl>
<dt><code>-sOutputFile="%printer%printer name"</code>
<dd>Output to the named printer.  If your printer is named "HP DeskJet 500"
316
    then you would use <code>-sOutputFile="%printer%HP DeskJet 500"</code>.</dd></dt>
317 318 319 320 321 322

</dl>
</blockquote>

<p>
If Ghostscript fails to find an environment variable, it looks for a
323
registry value of the same name under the key</p>
324 325 326 327 328 329

<blockquote><code>
HKEY_CURRENT_USER\Software\GPL Ghostscript\#.##
</code></blockquote>

<p>
330
    or if that fails, under the key</p>
331 332 333 334 335 336

<blockquote><code>
HKEY_LOCAL_MACHINE\SOFTWARE\GPL Ghostscript\#.##
</code></blockquote>

<p>
337
where #.## is the Ghostscript version number.</p>
338 339

<p>
340
Ghostscript will attempt to load the Ghostscript dynamic link library <code>GSDLL32.DLL</code> in the following order:</p>
341
<ul>
342
<li> In the same directory as the Ghostscript executable.</li>
343 344
<li> If the environment variable <code>GS_DLL</code> is defined,
Ghostscript tries to load the Ghostscript dynamic link library (DLL)
345
with the name given.</li>
346 347 348
<li> Using the standard Windows library search method: the directory
from which the application loaded, the current directory, the Windows
system directory, the Windows directory and the directories listed in
349
the PATH environment variable.</li>
350 351 352
</ul>

<p>
353
The Ghostscript installer will create registry values
354 355
for the environment variables <code>GS_LIB</code>
    and <code>GS_DLL</code>.</p>
356 357 358 359 360 361 362

<h3><a name="Uninstall_Windows"></a>Uninstalling Ghostscript on Windows</h3>

<p>
To uninstall Ghostscript, use the Control Panel, Add/Remove Programs and
remove "Ghostscript #.##" and "Ghostscript Fonts".  (The entries may be
called "GPL Ghostscript" or "AFPL Ghostscript", rather than just
363 364
"Ghostscript", depending on what version of Ghostscript was installed).
Alternatively, an uninstall shortcut is also available in the Start Menu
365
group.</p>
366 367 368 369
<hr>

<h2><a name="Install_VMS"></a>Installing Ghostscript on OpenVMS</h2>

370 371 372 373 374 375
<p>
Support for OpenVMS has stagnated (and almost certainly bit-rotted), and
as the core development team has no access to an OpenVMS environment, we
are unable to bring it up to date. We will consider patches from contributors
if any wish to take on the task of getting it working again. Given the
very limited appeal of OpenVMS these days, however, we are unlikely to consider
376
patches with invasive code changes.</p>
377

378 379 380 381
<p>
You need the file <code>GS.EXE</code> to run Ghostscript on OpenVMS, and
installing Ghostscript on an OpenVMS system requires building it first:
please read <a href="Make.htm#VMS_build">how to build Ghostscript on VMS</a>
382
in the documentation on building Ghostscript.</p>
383 384 385 386

<p>
The following installation steps assume that the Ghostscript directory is
<code>DISK1:[DIR.GHOSTSCRIPT]</code>.  Yours will almost certainly be in
387
a different location so adjust the following commands accordingly.</p>
388 389 390 391

<ul>

<li>Download the fonts and unpack them into
392
<code>DISK1:[DIR.GHOSTSCRIPT.LIB]</code>.</li>
393

394
<li>Enable access to the program and support files for all users with:</li>
395 396

<blockquote><pre>
397 398
&#36; set file/prot=w:re DISK1:[DIR]GHOSTSCRIPT.dir
&#36; set file/prot=w:re DISK1:[DIR.GHOSTSCRIPT...]*.*
399 400 401
</pre></blockquote>

<li>Optionally, add the Ghostscript help instructions to your system wide
402
help file:</li>
403 404

<blockquote><pre>
405
&#36; lib/help sys&#36;help:HELPLIB.HLB DISK1:[DIR.GHOSTSCRIPT.DOC]GS-VMS.HLP
406 407 408
</pre></blockquote>

<li>Lastly, add the following lines to the appropriate system wide or user
409
specific login script.</li>
410 411

<blockquote><pre>
412 413 414
&#36; define gs_exe DISK1:[DIR.GHOSTSCRIPT.BIN]
&#36; define gs_lib DISK1:[DIR.GHOSTSCRIPT.EXE]
&#36; gs :== &#36;gs_exe:gs.exe
415 416 417 418 419 420
</pre></blockquote>

</ul>

<p>
If you have DECWindows/Motif installed, you may wish to replace the
421
<code>FONTMAP.GS</code> file with <code>FONTMAP.VMS</code>.  Read the
422
comment at the beginning of the latter file for more information.</p>
423 424 425 426 427 428 429

<!-- [2.0 end contents] ==================================================== -->

<!-- [3.0 begin visible trailer] =========================================== -->
<hr>

<p>
430
<small>Copyright &copy; 2000-2019 Artifex Software, Inc.  All rights reserved.</small>
431 432 433 434 435 436 437 438

<p>
This software is provided AS-IS with no warranty, either express or
implied.

This software is distributed under license and may not be copied, modified
or distributed except as expressly authorized under the terms of that
license.  Refer to licensing information at http://www.artifex.com/
439 440
or contact Artifex Software, Inc.,  1305 Grant Avenue - Suite 200,
Novato, CA 94945, U.S.A., +1(415)492-9861, for further information.
441 442

<p>
443
<small>Ghostscript version 9.28, 15 August 2019
444 445 446

<!-- [3.0 end visible trailer] ============================================= -->

447
<!--FINISH EDITING HERE-->
448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477

    </div>
    </div>
    </div>

    <div class="footer">
    <div class="row">
        <div class="col-7 footleft">
        <ul>
            <li><a href="https://artifex.com/contact-us/" target="blank">CONTACT US</a></li>
            <li><a href="https://artifex.com/about-us/" target="blank">ABOUT</a></li>
            <li><a href="https://ghostscript.com/security.html">SECURITY</a></li>
        </ul>
        </div>
        <div class="col-1 footcenter">
         <ul>
           <li><a href="https://artifex.com/support/" target="blank">SUPPORT</a></li>
           <li><a href="https://artifex.com/blog/artifex/" target="blank">BLOG</a></li>
           <li><a href="https://artifex.com/privacy-policy/" target="blank">PRIVACY</a></li>
           </ul>
        </div>
        <div class="col-ft-3 footright"><img src="images/Artifex_logo.png" width="194" height="40" alt=""/> <br>
              © Copyright 2019 Artifex Software, Inc. <br>
            All rights reserved.
        </div>
          </div>
    </div>

    <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
    <script src="index.js"></script>
478
</body>
479
</html>