1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<html> 3<head> 4<title>How to install Ghostscript</title> 5<!-- $Id: Install.htm,v 1.56 2005/10/20 19:46:23 ray Exp $ --> 6<!-- Originally: install.txt --> 7<link rel="stylesheet" type="text/css" href="gs.css" title="Ghostscript Style"> 8</head> 9 10<body> 11<!-- [1.0 begin visible header] ============================================ --> 12 13<!-- [1.1 begin headline] ================================================== --> 14 15<h1>How to install Ghostscript</h1> 16 17<!-- [1.1 end headline] ==================================================== --> 18 19<!-- [1.2 begin table of contents] ========================================= --> 20 21<h2>Table of contents</h2> 22 23<blockquote><ul> 24<li><a href="#Overview">Overview of how to install Ghostscript</a> 25<li><a href="#Install_Unix">Installing Ghostscript on Unix</a> 26<ul> 27<li><a href="#Shared_object">Ghostscript as a shared object</a> 28<li><a href="#Install_Linux">Additional notes on Linux</a> 29</ul> 30<li><a href="#Install_Windows">Installing Ghostscript on MS Windows</a> 31<li><a href="#Install_VMS">Installing Ghostscript on OpenVMS</a> 32<li><a href="#Install_DOS">Installing Ghostscript on DOS</a> 33<li><a href="#Install_OS2">Installing Ghostscript on OS/2 2.x</a> 34</ul></blockquote> 35 36<!-- [1.2 end table of contents] =========================================== --> 37 38<!-- [1.3 begin hint] ====================================================== --> 39 40<p>For other information, see the <a href="Readme.htm">Ghostscript 41overview</a> and "<a href="Make.htm">How to build Ghostscript from source 42code</a>". 43 44<!-- [1.3 end hint] ======================================================== --> 45 46<hr> 47 48<!-- [1.0 end visible header] ============================================== --> 49 50<!-- [2.0 begin contents] ================================================== --> 51 52<h2><a name="Overview"></a>Overview of how to install Ghostscript</h2> 53 54<p> 55You must have three things to run Ghostscript: 56<ol> 57<li>The Ghostscript executable file; on some operating 58systems, more than one file is required. These are entirely 59platform-specific. See below for details. 60 61<li>Initialization files that Ghostscript reads in when it 62starts up; these are the same on all platforms. 63<ul> 64<li><b><tt>gs_</tt></b>*<b><tt>.ps</tt></b> unless Ghostscript was compiled 65using the "compiled initialization files" option. See the documentation of 66<a href="Psfiles.htm">PostScript files distributed with Ghostscript</a>. 67 68<li><b><tt>pdf_</tt></b>*<b><tt>.ps</tt></b> if Ghostscript was compiled 69with the ability to interpret Adobe Portable Document Format (PDF) files, 70that is, <b><tt>pdf.dev</tt></b> was included in 71<b><tt>FEATURE_DEVS</tt></b> when Ghostscript was built. 72 73<li><b><tt>Fontmap</tt></b> and <b><tt>Fontmap.GS</tt></b> (or the 74appropriate <b><tt>Fontmap.</tt></b><em>xxx</em> for your platform), unless 75you plan always to invoke Ghostscript with the <a 76href="Use.htm#FONTMAP_switch"><b><tt>-dNOFONTMAP</tt></b> switch</a>. 77</ul> 78 79<li>Fonts, for rendering text. These are platform-independent, 80but if you already have fonts of the right kind on your platform, 81you may be able to use those. See below for details. Also see the 82<a href="Fonts.htm">documentation on fonts</a>. 83</ol> 84 85<p> 86The <a href="Use.htm">usage documentation</a> describes the search 87algorithms used to find initialization files and font files. The 88per-platform descriptions that follow tell you where to install these 89files. 90 91<hr> 92 93<h2><a name="Install_Unix"></a>Installing Ghostscript on Unix</h2> 94 95<p> 96Ghostscript uses the common configure, build and install method common 97to many modern software packages. In general the following with suffice 98to build ghostscript: 99<blockquote><tt><b> 100 ./configure<br> 101 make 102</b></tt></blockquote> 103and then it may be installed in the default location with: 104<blockquote><b> 105 <tt>make install</tt> 106</b></blockquote> 107This last command may need to be performed with super user privileges. 108 109<p> 110You can set the installation directory by adding <tt>--prefix=<em>path</em></tt> 111to the configure invocation in the first step. The default prefix is <tt>/usr/local</tt>, 112which is to say the <tt>gs</tt> executable is installed as <tt>/usr/local/bin/gs</tt>. 113 114</p>A list of similar configuration options is available via <tt>./configure --help</tt> 115 116<p> 117For more detailed information on building Ghostscript see 118<a href="Make.htm#Unix_build">how to build Ghostscript on Unix</a> in 119the documentation on building Ghostscript, especially regarding information 120on using the older <a href="Make.htm#UNIX_makefile">hand edited makefile</a> 121approach. Whatever configuration method you use, execute "<b><tt>make 122install</tt></b>" to install the executable and all the required and 123ancillary files after the build is complete. 124 125<h3><a name="Use_Acrobat_fonts_Unix"></a>Fonts</h3> 126 127<p> 128The makefile installs all the files except fonts under the directory 129defined in the makefile as <b><tt>prefix</tt></b>. Fonts need to be 130installed separately. The fonts should be installed in 131<tt><em>{prefix}</em>/share/ghostscript/fonts</tt>. 132(That is, <tt>/usr/local/share/ghostscript/fonts/</tt> if you used the default 133configuration above.) 134 135<p> 136If you have Adobe Acrobat installed, you can use the Acrobat fonts 137in place of the ones distributed with with Ghostscript by adding the 138Acrobat fonts directory to 139<b><tt>GS_FONTPATH</tt></b> and removing these fonts from 140<b><tt>Fontmap.GS</tt></b>: 141 142<blockquote> 143Courier, Courier-Bold, Courier-BoldOblique, Courier-Oblique, Helvetica, 144Helvetica-Bold, Helvetica-BoldOblique, Helvetica-Oblique, Symbol, Times-Bold, 145Times-BoldItalic, Times-Italic, Times-Roman, ZapfDingbats 146</blockquote> 147 148<p> 149Similarly, you can have ghostscript use other fonts on your system by adding 150entries to the fontmap or adding the directories to the GS_FONTMAP environment 151variable. See the <a href="Use.htm#Font_lookup">usage documentation</a> for more 152information. 153For example, many linux distributions place fonts under <tt>/usr/share/fonts</tt>. 154 155<h3><a name="Shared_object"></a>Ghostscript as a shared object</h3> 156If you've built Ghostscript as a shared object, instead of '<tt>make install</tt>', 157you must use '<tt>make soinstall</tt>'. 158See <a href="Make.htm#Shared_object">how to build Ghostscript 159as a shared object</a> for more details. 160 161<h3><a name="Install_Linux"></a>Additional notes on Linux</h3> 162 163<p> 164For Linux, you may be able to install or upgrade Ghostscript from 165precompiled <a href="http://www.rpm.org">RPM</a> files using: 166 167<blockquote><b><tt> 168rpm -U ghostscript-N.NN-1.i386.rpm<br> 169rpm -U ghostscript-fonts-N.NN-1.noarch.rpm 170</tt></b></blockquote> 171 172<p> 173However, please note that we do not create RPMs for Ghostscript, and we take 174no responsibility for RPMs created by others. 175 176<hr> 177 178<h2><a name="Install_Windows"></a>Installing Ghostscript on MS Windows</h2> 179 180<p> 181We usually distribute Ghostscript releases for Windows as self-extracting 182archive files, since this is the most convenient form for users. These 183files can also be unpacked as if they were plain zip files. 184 185<p> 186The self-extracting archive is normally named 187<b><tt>gs###w32.exe</tt></b>, 188where ### is the release number (e.g., 650 for Ghostscript 6.50, 189700 for Ghostscript 7.00). 190 191<h3><a name="Windows4"></a>Windows 95/98 and NT 4</h3> 192 193<p> 194To install a self-extracting Ghostscript archive on Windows 95/98 or 195Windows NT4/2000, you need just this self-extracting archive file. 196Run this file to install Ghostscript. 197 198<p> 199Alternatively, if you have the zip file, unzip it to a temporary 200directory then run the included <b><tt>setupgs.exe</tt></b>. 201After the setup program has finished, remove the temporary files. 202 203<p> 204After installing Ghostscript, it is strongly recommended that you 205install the <b>GSview previewer</b>, 206which provides an easier to use graphical interface for Ghostscript. 207Information on GSview is available from: 208 209<blockquote> 210<a 211href="http://www.cs.wisc.edu/~ghost/gsview/" 212class="offsite">http://www.cs.wisc.edu/~ghost/gsview/</a> 213</blockquote> 214 215<h3><a name="General_Windows"></a>General Windows configuration</h3> 216 217<p> 218The archive includes files in these subdirectories: 219 220<blockquote><b><tt> 221gs<em>#.##</em>\bin 222<br>gs<em>#.##</em>\lib 223<br>gs<em>#.##</em>\examples 224<br>gs<em>#.##</em>\doc 225<br>fonts 226</tt></b></blockquote> 227 228<p> 229The actual executable files, in the <b><tt>gs<em>#.##</em>\bin</tt></b> 230subdirectory, are: 231 232<blockquote><table cellpadding=0 cellspacing=0> 233<tr valign=top> <td><b><tt>GSWIN32.EXE</tt></b> 234 <td> 235 <td>32-bit Ghostscript using windows 236<tr valign=top> <td><b><tt>GSWIN32C.EXE</tt></b> 237 <td> 238 <td>32-bit Ghostscript using only the command line 239<tr valign=top> <td><b><tt>GSDLL32.DLL</tt></b> 240 <td> 241 <td>32-bit dynamic link library containing most of Ghostscript's 242functionality 243</table></blockquote> 244 245<p> 246See "<a href="#Install_DOS">Installing Ghostscript on DOS</a>" below for 247information about using Adobe Type Manager, Adobe Type Basics, or Adobe 248Acrobat fonts. If your system uses TrueType fonts, you can get them 249converted to a Ghostscript-compatible format at the time you select your 250"printer" by doing the following: 251 252<blockquote><ol> 253<li>Open control panel and double-click on the "Printers" icon. 254<li>Select your PostScript printer. 255<li>Choose Setup. 256<li>Choose Options. 257<li>Choose Advanced. 258<li>At the top of the dialog box you will see TrueType Fonts Send to 259Printer As: Choose <em>(drop-down menu)</em> Adobe Type 1. 260<li>Uncheck Use Printer Fonts for All TrueType Fonts and Use 261Substitution 262Table. 263<li>OK. 264<li>OK etc. 265</ol></blockquote> 266 267<p> 268That's it! Your TrueType fonts will automatically be downloaded in your 269PostScript file for Ghostscript to use. 270 271<p> 272For printer devices, the default output is: 273 274<blockquote><table cellpadding=0 cellspacing=0> 275<tr valign=top> <td>The default printer 276 <td> 277 <td>Win95 or WinNT 278<tr valign=top> <td>Prompt for a printer port 279 <td> 280 <td>Win32s (Windows 3.1) 281</table></blockquote> 282 283<p> 284This can be modified as follows. 285 286<blockquote> 287<dl> 288<dt><b><tt>-sOutputFile="LPT1:"</tt></b> 289<dd>Output to the named port. 290 291<dt><b><tt>-sOutputFile="%printer%printer name"</tt></b> (Windows 95, 98, 292NT or 2000) 293<dd>Output to the named printer. If your printer is named "HP DeskJet 500" 294then you would use <tt>-sOutputFile="%printer%HP DeskJet 500"</tt>. 295 296<dt><b><tt>-sOutputFile="\\spool\printer name"</tt></b> (Windows 3.1/Win32s) 297<dd>Output to the named printer. Note that this is NOT a UNC name. 298 299</dl> 300</blockquote> 301 302<p> 303If Ghostscript fails to find an environment variable, it looks for a 304registry value of the same name under the key 305 306<blockquote><b><tt> 307HKEY_CURRENT_USER\Software\AFPL Ghostscript\#.## 308</tt></b></blockquote> 309 310<p> 311or if that fails, under the key 312 313<blockquote><b><tt> 314HKEY_LOCAL_MACHINE\SOFTWARE\AFPL Ghostscript\#.## 315</tt></b></blockquote> 316 317<p> 318where #.## is the Ghostscript version number. This does not work under 319Win32s (that is, Windows 3.1, which doesn't support named registry 320values). 321 322<p> 323Ghostscript will attempt to load the Ghostscript dynamic link 324library <b><tt>GSDLL32.DLL</tt></b> in the following order: 325<ul> 326<li> In the same directory as the Ghostscript executable. 327<li> If the environment variable <b><tt>GS_DLL</tt></b> is defined, 328Ghostscript tries to load the Ghostscript dynamic link library (DLL) 329with the name given. 330<li> Using the standard Windows library search method: the directory 331from which the application loaded, the current directory, the Windows 332system directory, the Windows directory and the directories listed in 333the PATH environment variable. 334</ul> 335 336<p> 337The Ghostscript setup program will create registry values 338for the environment variables <b><tt>GS_LIB</tt></b> 339and <b><tt>GS_DLL</tt></b>. 340 341<h3><a name="Uninstall_Windows"></a>Uninstalling Ghostscript on Windows</h3> 342 343<p> 344To uninstall Ghostscript, use the Control Panel, Add/Remove Programs and 345remove "Ghostscript #.##" and "Ghostscript Fonts". (The entries may be 346called "Aladdin Ghostscript" or "AFPL Ghostscript", rather than just 347"Ghostscript", depending on what version of Ghostscript was installed.) 348 349<hr> 350 351<h2><a name="Install_VMS"></a>Installing Ghostscript on OpenVMS</h2> 352 353<p> 354You need the file <b><tt>GS.EXE</tt></b> to run Ghostscript on OpenVMS, and 355installing Ghostscript on an OpenVMS system requires building it first: 356please read <a href="Make.htm#VMS_build">how to build Ghostscript on VMS</a> 357in the documentation on building Ghostscript. 358 359<p> 360The following installation steps assume that the Ghostscript directory is 361<b><tt>DISK1:[DIR.GHOSTSCRIPT]</tt></b>. Yours will almost certainly be in 362a different location so adjust the following commands accordingly. 363 364<ul> 365 366<li>Download the fonts and unpack them into 367<b><tt>DISK1:[DIR.GHOSTSCRIPT.LIB]</tt></b>. 368 369<li>Enable access to the program and support files for all users with: 370 371<blockquote><pre> 372$ set file/prot=w:re DISK1:[DIR]GHOSTSCRIPT.dir 373$ set file/prot=w:re DISK1:[DIR.GHOSTSCRIPT...]*.* 374</pre></blockquote> 375 376<li>Optionally, add the Ghostscript help instructions to your system wide 377help file: 378 379<blockquote><pre> 380$ lib/help sys$help:HELPLIB.HLB DISK1:[DIR.GHOSTSCRIPT.DOC]GS-VMS.HLP 381</pre></blockquote> 382 383<li>Lastly, add the following lines to the appropriate system wide or user 384specific login script. 385 386<blockquote><pre> 387$ define gs_exe DISK1:[DIR.GHOSTSCRIPT.BIN] 388$ define gs_lib DISK1:[DIR.GHOSTSCRIPT.EXE] 389$ gs :== $gs_exe:gs.exe 390</pre></blockquote> 391 392</ul> 393 394<p> 395If you have DECWindows/Motif installed, you may wish to replace the 396<b><tt>FONTMAP.GS</tt></b> file with <b><tt>FONTMAP.VMS</tt></b>. Read the 397comment at the beginning of the latter file for more information. 398 399<hr> 400 401<h2><a name="Install_DOS"></a>Installing Ghostscript on DOS</h2> 402 403<p> 404You need the files <b><tt>GS386.EXE</tt></b> and <b><tt>DOS4GW.EXE</tt></b> 405to run Ghostscript. You should install all the files except the fonts in 406<b><tt>C:\GS</tt></b>, and the fonts in <b><tt>C:\GS\FONTS</tt></b>. 407 408<p><a name="Use_platform_fonts_DOS"></a> If you have Adobe Type Manager 409(ATM) fonts installed on your system, and you wish to use them with 410Ghostscript, you may wish to replace the <b><tt>FONTMAP</tt></b> file with 411<b><tt>FONTMAP.ATM</tt></b>, and to add to the environment variable 412<b><tt>GS_LIB</tt></b> the name of the directory where the fonts are located 413(see <a href="Use.htm#Finding_files">Use.htm</a> for more information 414about <b><tt>GS_LIB</tt></b>). Before you 415do this, please read carefully the license that accompanies the ATM fonts; 416we take no responsibility for any possible violations of such licenses. 417Similarly, if you have Adobe Type Basics, you may wish to replace 418<b><tt>FONTMAP</tt></b> with <b><tt>FONTMAP.ATB</tt></b>. Finally, if you 419have neither ATM nor ATB but you have Adobe Acrobat installed, you can use 420the Acrobat fonts in place of the ones provided with Ghostscript by adding 421the Acrobat fonts directory to <b><tt>GS_FONTPATH</tt></b> and removing 422these fonts from <b><tt>FONTMAP</tt></b>: 423 424<blockquote> 425Courier, Courier-Bold, Courier-BoldOblique, Courier-Oblique, Helvetica, 426Helvetica-Bold, Helvetica-BoldOblique, Helvetica-Oblique, Symbol, Times-Bold, 427Times-BoldItalic, Times-Italic, Times-Roman, ZapfDingbats 428</blockquote> 429 430<hr> 431 432<h2><a name="Install_OS2"></a>Installing Ghostscript on OS/2 2.x</h2> 433 434<p> 435The Ghostscript OS/2 implementation is designed for OS/2 2.1 or later. A 436few people have used it successfully under OS/2 2.0, but it has had very 437little testing. You need these files to run Ghostscript on OS/2: 438 439<blockquote><table cellpadding=0 cellspacing=0> 440<tr valign=top> <td><b><tt>GSOS2.EXE</tt></b> 441 <td> 442 <td>A text application that will run windowed or full screen 443<tr valign=top> <td><b><tt>GSDLL2.DLL</tt></b> 444 <td> 445 <td>A dynamic link library that must be in the same directory as 446 <b><tt>GSOS2.EXE</tt></b> or on the <b><tt>LIBPATH</tt></b>. 447<tr valign=top> <td><b><tt>GSPMDRV.EXE</tt></b> 448 <td> 449 <td>An "external driver" used by the "<b><tt>os2pm</tt></b>" 450 device, which is normally the default device and which displays 451 output in a Presentation Manager window; 452 <b><tt>GSPMDRV.EXE</tt></b> must be located in the same 453 directory as <b><tt>GSOS2.EXE</tt></b> or on the 454 <b><tt>PATH</tt></b> 455</table></blockquote> 456 457<p> 458<b><tt>GSOS2.EXE</tt></b>, <b><tt>GSDLL2.DLL</tt></b> and 459<b><tt>GSPMDRV.EXE</tt></b> are compiled using EMX/GCC 0.9d. You must have 460the EMX DLLs on your <b><tt>LIBPATH</tt></b>; they are available in a 461package <b><tt>emxrt.zip</tt></b> from many places on the Internet, so you 462can find the package by using a search engine or an ftp lookup service such 463as the one at 464 465<blockquote> 466<a href="http://ftpsearch.lycos.com/" 467class="offset">http://ftpsearch.lycos.com/</a> 468</blockquote> 469 470<p> 471The system menu of the Ghostscript Image window includes a "Copy" command 472to copy the currently displayed bitmap to the Clipboard. 473 474<p> 475OS/2 comes with some Adobe Type Manager fonts. If you wish to use these with 476Ghostscript, you should replace the <b><tt>FONTMAP</tt></b> file with 477<b><tt>FONTMAP.OS2</tt></b>, and add to the environment variable 478<b><tt>GS_LIB</tt></b> (see <a href="Use.htm#Finding_files">Use.htm</a> 479for more information about 480<b><tt>GS_LIB</tt></b>) the name of the directory where the fonts are 481located, usually <b><tt>C:\PSFONTS</tt></b>. Before you do this, please 482read carefully the license that accompanies the ATM fonts; we take no 483responsibility for any possible violations of such licenses. 484 485<p> 486Since <b><tt>GSOS2.EXE</tt></b> is not a PM application, it cannot 487determine the depth of the PM display. You must provide this information 488using the <b><tt>-dBitsPerPixel</tt></b> option. Valid values are 1, 4, 8 489(the default), and 24. 490 491<blockquote><table cellpadding=0 cellspacing=0> 492<tr valign=bottom> 493 <th align=left>Use 494 <td> 495 <th align=left>For 496<tr> <td colspan=3><hr> 497<tr valign=top> <td><b><tt>-dBitsPerPixel=1</tt></b> 498 <td> 499 <td>VGA monochrome 500<tr valign=top> <td><b><tt>-dBitsPerPixel=4</tt></b> 501 <td> 502 <td>VGA standard 503<tr valign=top> <td><b><tt>-dBitsPerPixel=8</tt></b> 504 <td> 505 <td>SVGA 256 colors 506</table></blockquote> 507 508<p> 509A command file <b><tt>gspm.cmd</tt></b> containing the following line may 510be useful: 511 512<blockquote><b><tt> 513@c:\gs\gsos2.exe -Ic:/gs;c:/gs/fonts;c:/psfonts -sDEVICE=os2pm -dBitsPerPixel=8 -sPAPERSIZE=a4 %1 %2 %3 %4 %5 %6 %7 %8 514</tt></b></blockquote> 515 516<p> 517While drawing, the <b><tt>os2pm</tt></b> driver updates the display every 5 518seconds. On slow computers this is undesirable, and a different interval 519can be specified in milliseconds with the <b><tt>-dUpdateInterval</tt></b> 520option, with a default of <b><tt>-dUpdateInterval=5000</tt></b>; to disable 521update, use <b><tt>-dUpdateInterval=0</tt></b>. 522 523<p> 524Standard VGA is very slow because it uses double buffering to avoid bugs 525and because of 1-plane to 4-plane conversion; it's better to use a 526256-color display driver. Many display drivers have bugs which cause 1 527bit-per-pixel bitmaps to be displayed incorrectly. 528 529<p> 530<b><tt>GSOS2.EXE</tt></b> and <b><tt>GSPMDRV.EXE</tt></b> will stay in 531memory for the number of minutes specified in the environment variable 532<b><tt>GS_LOAD</tt></b>. 533 534<p> 535If you run <b><tt>GS386</tt></b> in the OS/2 2.0 or 2.1 DOS box, you must 536select the "ENABLED" setting for the DPMI_DOS_API option of the DOS box. 537<b><tt>GS386</tt></b> will not run with the "AUTO" setting. 538 539<p> 540For printer devices, output goes to the default queue. To print to a 541specified queue, use <b><tt>-sOutputFile=\\spool\NullLPT1</tt></b>, where 542<b><tt>NullLPT1</tt></b> is the queue's physical name. 543 544<!-- [2.0 end contents] ==================================================== --> 545 546<!-- [3.0 begin visible trailer] =========================================== --> 547<hr> 548 549<p> 550<small>Copyright © 1996, 2000 Aladdin Enterprises. All rights 551reserved.</small> 552 553<p> 554This software is provided AS-IS with no warranty, either express or 555implied. 556 557This software is distributed under license and may not be copied, 558modified or distributed except as expressly authorized under the terms 559of the license contained in the file LICENSE in this distribution. 560 561For more information about licensing, please refer to 562http://www.ghostscript.com/licensing/. For information on 563commercial licensing, go to http://www.artifex.com/licensing/ or 564contact Artifex Software, Inc., 101 Lucas Valley Road #110, 565San Rafael, CA 94903, U.S.A., +1(415)492-9861. 566 567<p> 568<small>Ghostscript version 8.53, 20 October 2005 569 570<!-- [3.0 end visible trailer] ============================================= --> 571 572</body> 573</html> 574