[ed30f09] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[73ddd1a0] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
[00b6675] | 6 |
|
---|
[a5653eb] | 7 | <!-- When updating, ensure gs9xx is updated in url -->
|
---|
| 8 |
|
---|
[6b58d592] | 9 | <!ENTITY gs-download-http
|
---|
[d92d2e0] | 10 | "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs952/ghostscript-&gs-version;.tar.xz">
|
---|
[de109d93] | 11 | <!ENTITY gs-download-ftp " ">
|
---|
[bb65a3c] | 12 | <!ENTITY gs-md5sum "2dd455dba172010b46225819a5485389">
|
---|
| 13 | <!ENTITY gs-size "38 MB">
|
---|
| 14 | <!ENTITY gs-buildsize "169 MB (with fonts and libgs.so)">
|
---|
| 15 | <!ENTITY gs-time "1.5 SBU (Using parallelism=4; with libgs.so)">
|
---|
[100786d] | 16 |
|
---|
[95b8c6d] | 17 | <!ENTITY gs-standard-fonts-download
|
---|
[8dfc5c3] | 18 | "&sourceforge-dl;/gs-fonts/ghostscript-fonts-std-8.11.tar.gz">
|
---|
[00b6675] | 19 | <!ENTITY gs-standard-fonts-md5sum "6865682b095f8c4500c54b285ff05ef6">
|
---|
[100786d] | 20 | <!ENTITY gs-standard-fonts-size "3.7 MB">
|
---|
[00b6675] | 21 |
|
---|
[95b8c6d] | 22 | <!ENTITY gs-other-fonts-download
|
---|
[8dfc5c3] | 23 | "&sourceforge-dl;/gs-fonts/gnu-gs-fonts-other-6.0.tar.gz">
|
---|
[100786d] | 24 | <!ENTITY gs-other-fonts-md5sum "33457d3f37de7ef03d2eea05a9e6aa4f">
|
---|
| 25 | <!ENTITY gs-other-fonts-size "796 KB">
|
---|
[73ddd1a0] | 26 | ]>
|
---|
| 27 |
|
---|
[a027d7d3] | 28 | <sect1 id="gs" xreflabel="ghostscript-&gs-version;">
|
---|
[ed30f09] | 29 | <?dbhtml filename="gs.html"?>
|
---|
| 30 |
|
---|
| 31 | <sect1info>
|
---|
| 32 | <othername>$LastChangedBy$</othername>
|
---|
| 33 | <date>$Date$</date>
|
---|
| 34 | </sect1info>
|
---|
| 35 |
|
---|
[a027d7d3] | 36 | <title>ghostscript-&gs-version;</title>
|
---|
[ed30f09] | 37 |
|
---|
| 38 | <indexterm zone="gs">
|
---|
[0c32749] | 39 | <primary sortas="a-Ghostscript">Ghostscript</primary>
|
---|
[ed30f09] | 40 | </indexterm>
|
---|
| 41 |
|
---|
| 42 | <sect2 role="package">
|
---|
| 43 | <title>Introduction to Ghostscript</title>
|
---|
| 44 |
|
---|
[fa3edfef] | 45 | <para>
|
---|
| 46 | <application>Ghostscript</application> is a versatile processor
|
---|
| 47 | for PostScript data with the ability to render PostScript to different
|
---|
| 48 | targets. It is a mandatory part of the cups printing stack.
|
---|
| 49 | </para>
|
---|
[ed30f09] | 50 |
|
---|
[d9907c9] | 51 | &lfs91_checked;
|
---|
[aa8ef3bc] | 52 |
|
---|
[ed30f09] | 53 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 54 | <itemizedlist spacing="compact">
|
---|
| 55 | <listitem>
|
---|
[fa3edfef] | 56 | <para>
|
---|
| 57 | Download (HTTP): <ulink url="&gs-download-http;"/>
|
---|
| 58 | </para>
|
---|
[ed30f09] | 59 | </listitem>
|
---|
| 60 | <listitem>
|
---|
[fa3edfef] | 61 | <para>
|
---|
| 62 | Download (FTP): <ulink url="&gs-download-ftp;"/>
|
---|
| 63 | </para>
|
---|
[ed30f09] | 64 | </listitem>
|
---|
| 65 | <listitem>
|
---|
[fa3edfef] | 66 | <para>
|
---|
| 67 | Download MD5 sum: &gs-md5sum;
|
---|
| 68 | </para>
|
---|
[ed30f09] | 69 | </listitem>
|
---|
| 70 | <listitem>
|
---|
[fa3edfef] | 71 | <para>
|
---|
| 72 | Download size: &gs-size;
|
---|
| 73 | </para>
|
---|
[ed30f09] | 74 | </listitem>
|
---|
| 75 | <listitem>
|
---|
[fa3edfef] | 76 | <para>
|
---|
| 77 | Estimated disk space required: &gs-buildsize;
|
---|
| 78 | </para>
|
---|
[ed30f09] | 79 | </listitem>
|
---|
| 80 | <listitem>
|
---|
[fa3edfef] | 81 | <para>
|
---|
| 82 | Estimated build time: &gs-time;
|
---|
| 83 | </para>
|
---|
[ed30f09] | 84 | </listitem>
|
---|
| 85 | </itemizedlist>
|
---|
[1bff7a94] | 86 |
|
---|
[ed30f09] | 87 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
[fa3edfef] | 88 | <para>
|
---|
| 89 | If you wish, you can download additional fonts.
|
---|
| 90 | </para>
|
---|
[933ceec] | 91 |
|
---|
[6b58d592] | 92 | <itemizedlist spacing="compact">
|
---|
[ed30f09] | 93 | <title>Standard Fonts</title>
|
---|
| 94 | <listitem>
|
---|
[fa3edfef] | 95 | <para>
|
---|
| 96 | Download (HTTP): <ulink url="&gs-standard-fonts-download;"/>
|
---|
| 97 | </para>
|
---|
[ed30f09] | 98 | </listitem>
|
---|
| 99 | <listitem>
|
---|
[fa3edfef] | 100 | <para>
|
---|
| 101 | Download MD5 sum: &gs-standard-fonts-md5sum;
|
---|
| 102 | </para>
|
---|
[ed30f09] | 103 | </listitem>
|
---|
| 104 | <listitem>
|
---|
[fa3edfef] | 105 | <para>
|
---|
| 106 | Download size: &gs-standard-fonts-size;
|
---|
| 107 | </para>
|
---|
[ed30f09] | 108 | </listitem>
|
---|
| 109 | </itemizedlist>
|
---|
| 110 |
|
---|
[6b58d592] | 111 | <itemizedlist spacing="compact">
|
---|
[ed30f09] | 112 | <title>Other Fonts</title>
|
---|
| 113 | <listitem>
|
---|
[fa3edfef] | 114 | <para>
|
---|
| 115 | Download (HTTP): <ulink url="&gs-other-fonts-download;"/>
|
---|
| 116 | </para>
|
---|
[ed30f09] | 117 | </listitem>
|
---|
| 118 | <listitem>
|
---|
[fa3edfef] | 119 | <para>
|
---|
| 120 | Download MD5 sum: &gs-other-fonts-md5sum;
|
---|
| 121 | </para>
|
---|
[ed30f09] | 122 | </listitem>
|
---|
| 123 | <listitem>
|
---|
[fa3edfef] | 124 | <para>
|
---|
| 125 | Download size: &gs-other-fonts-size;
|
---|
| 126 | </para>
|
---|
[ed30f09] | 127 | </listitem>
|
---|
| 128 | </itemizedlist>
|
---|
| 129 |
|
---|
[b29ed97c] | 130 | <bridgehead renderas="sect3">Ghostscript Dependencies</bridgehead>
|
---|
[ed30f09] | 131 |
|
---|
[de109d93] | 132 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
[2d37d32] | 133 | <para role="recommended">
|
---|
[7524e07] | 134 | <xref linkend="cups"/> (required for building the <quote>cups</quote>
|
---|
| 135 | device backend, which is needed by
|
---|
| 136 | <application>cups-filters</application>),
|
---|
| 137 | <xref linkend="fontconfig"/> (required, if you are installing any
|
---|
| 138 | suggested font),
|
---|
[2d37d32] | 139 | <xref linkend="freetype2"/>,
|
---|
| 140 | <xref linkend="libjpeg"/>,
|
---|
[933ceec] | 141 | <xref linkend="libpng"/>,
|
---|
[bb65a3c] | 142 | <xref linkend="libtiff"/>, and
|
---|
[12341a8] | 143 | <xref linkend="openjpeg2"/>
|
---|
[2d37d32] | 144 | </para>
|
---|
[de109d93] | 145 |
|
---|
| 146 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[2d37d32] | 147 | <para role="optional">
|
---|
| 148 | <xref linkend="cairo"/>,
|
---|
[f7153b6] | 149 | <xref linkend="gtk3"/>,
|
---|
[2d37d32] | 150 | <xref linkend="libidn"/>,
|
---|
[bb65a3c] | 151 | <xref linkend="libpaper"/>, and
|
---|
[1ecdb18] | 152 | <xref linkend="x-window-system"/>
|
---|
[2d37d32] | 153 | </para>
|
---|
| 154 |
|
---|
| 155 | <para condition="html" role="usernotes">
|
---|
| 156 | User Notes: <ulink url="&blfs-wiki;/gs"/>
|
---|
| 157 | </para>
|
---|
[ed30f09] | 158 | </sect2>
|
---|
| 159 |
|
---|
| 160 | <sect2 role="installation">
|
---|
| 161 | <title>Installation of Ghostscript</title>
|
---|
| 162 |
|
---|
[2d37d32] | 163 | <note>
|
---|
| 164 | <para>
|
---|
| 165 | The <application>Ghostscript</application> build system is not
|
---|
| 166 | user-friendly. In order to use system copies of various graphics
|
---|
| 167 | libraries, you must do it using unconventional methods.
|
---|
| 168 | </para>
|
---|
| 169 | </note>
|
---|
[100786d] | 170 |
|
---|
[2d37d32] | 171 | <para>
|
---|
[0c32749] | 172 | <application>Ghostscript</application> includes (old) copies of
|
---|
[de109d93] | 173 | several libraries. Some of these seem to have been patched to fix known
|
---|
| 174 | vulnerabilities, but others of these copies are less-well maintained.
|
---|
| 175 | To ensure that any future fixes are applied throughout the whole system,
|
---|
[2d37d32] | 176 | it is recommended that you first install the released versions of these
|
---|
[0c32749] | 177 | libraries and then configure <application>Ghostscript</application>
|
---|
[2d37d32] | 178 | to link to them.
|
---|
| 179 | </para>
|
---|
[d453af5] | 180 |
|
---|
[2d37d32] | 181 | <para>
|
---|
[4886a74] | 182 | If you have installed the recommended dependencies on your system,
|
---|
| 183 | remove the copies of
|
---|
[1df1b16] | 184 | <application>freetype</application>, <application>lcms2</application>,
|
---|
[12341a8] | 185 | <application>libjpeg</application>, <application>libpng</application>,
|
---|
| 186 | and <application>openjpeg</application>:
|
---|
[2d37d32] | 187 | </para>
|
---|
[ed30f09] | 188 |
|
---|
[12341a8] | 189 | <screen><userinput>rm -rf freetype lcms2mt jpeg libpng openjpeg</userinput></screen>
|
---|
[2d37d32] | 190 |
|
---|
[fa3edfef] | 191 | <para>
|
---|
| 192 | Compile <application>Ghostscript</application>:
|
---|
| 193 | </para>
|
---|
[de109d93] | 194 |
|
---|
[595e58e] | 195 | <screen><userinput>rm -rf zlib &&
|
---|
[60d53ec3] | 196 |
|
---|
| 197 | ./configure --prefix=/usr \
|
---|
| 198 | --disable-compile-inits \
|
---|
| 199 | --enable-dynamic \
|
---|
| 200 | --with-system-libtiff &&
|
---|
[038ea6ba] | 201 | make</userinput></screen>
|
---|
| 202 |
|
---|
[d453af5] | 203 | <note>
|
---|
[2d37d32] | 204 | <para>
|
---|
[9bfd70c] | 205 | The shared library depends on <xref linkend="gtk3"/>. It is only used by
|
---|
[7ab0957e] | 206 | external programs like <xref linkend="asymptote"/>, <xref
|
---|
[47d5a9e5] | 207 | linkend="dvisvgm"/>, <xref linkend="imagemagick"/>, and <xref
|
---|
| 208 | linkend="texlive"/>.
|
---|
[2d37d32] | 209 | </para>
|
---|
[d453af5] | 210 | </note>
|
---|
[038ea6ba] | 211 |
|
---|
[2d37d32] | 212 | <para>
|
---|
| 213 | To compile the shared library
|
---|
| 214 | <filename class="libraryfile">libgs.so</filename>, run the following
|
---|
| 215 | additional command as an unprivileged user:
|
---|
| 216 | </para>
|
---|
[038ea6ba] | 217 |
|
---|
| 218 | <screen><userinput>make so</userinput></screen>
|
---|
[73ddd1a0] | 219 |
|
---|
[2d37d32] | 220 | <para>
|
---|
[a2a37c7] | 221 | This package does not come with a test suite. A set of example files
|
---|
| 222 | may be used for testing, but it is only possible after installation
|
---|
| 223 | of the package.
|
---|
[2d37d32] | 224 | </para>
|
---|
[d453af5] | 225 |
|
---|
[2d37d32] | 226 | <para>
|
---|
| 227 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 228 | </para>
|
---|
[038ea6ba] | 229 |
|
---|
[d453af5] | 230 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 231 |
|
---|
[fa3edfef] | 232 | <para>
|
---|
| 233 | If you want the shared library too:
|
---|
| 234 | </para>
|
---|
[d453af5] | 235 |
|
---|
| 236 | <screen role="root"><userinput>make soinstall &&
|
---|
[aa8ef3bc] | 237 | install -v -m644 base/*.h /usr/include/ghostscript &&
|
---|
[eff6c3a8] | 238 | ln -sfvn ghostscript /usr/include/ps</userinput></screen>
|
---|
[73ddd1a0] | 239 |
|
---|
[fa3edfef] | 240 | <para>
|
---|
| 241 | Now make the documentation accessible from the normal place:
|
---|
| 242 | </para>
|
---|
[a0968dcc] | 243 | <!-- Starting with 9.23, the install does not seem to copy the examples any more -->
|
---|
[d453af5] | 244 |
|
---|
[12341a8] | 245 | <screen role="root"><userinput>mv -v /usr/share/doc/ghostscript/&gs-version; /usr/share/doc/ghostscript-&gs-version; &&
|
---|
| 246 | rm -rfv /usr/share/doc/ghostscript &&
|
---|
[654fe2b] | 247 | cp -r examples/ /usr/share/ghostscript/&gs-version;/</userinput></screen>
|
---|
[73ddd1a0] | 248 |
|
---|
[2d37d32] | 249 | <para>
|
---|
[798c542] | 250 | If you have downloaded the fonts, unpack them to
|
---|
[2d37d32] | 251 | <filename class="directory">/usr/share/ghostscript</filename> and ensure
|
---|
| 252 | the ownerships of the files are
|
---|
| 253 | <systemitem class="username">root</systemitem>:
|
---|
[798c542] | 254 | <systemitem class="groupname">root</systemitem>.
|
---|
[2d37d32] | 255 | </para>
|
---|
[038ea6ba] | 256 |
|
---|
[798c542] | 257 | <screen role="root"><userinput>tar -xvf ../ghostscript-fonts-std-8.11.tar.gz -C /usr/share/ghostscript --no-same-owner &&
|
---|
| 258 | tar -xvf ../gnu-gs-fonts-other-6.0.tar.gz -C /usr/share/ghostscript --no-same-owner &&
|
---|
[142f958b] | 259 | fc-cache -v /usr/share/ghostscript/fonts/</userinput></screen>
|
---|
[a2a37c7] | 260 |
|
---|
| 261 | <para>
|
---|
| 262 | You can now test the rendering of various postscript and pdf files from the
|
---|
| 263 | <filename class="directory">/usr/share/ghostscript/&gs-version;/examples
|
---|
| 264 | </filename>, for example (you need an X window system display):
|
---|
| 265 | </para>
|
---|
| 266 |
|
---|
[c77fb71f] | 267 | <screen remap="test"><userinput>gs -q -dBATCH /usr/share/ghostscript/&gs-version;/examples/tiger.eps</userinput></screen>
|
---|
[a2a37c7] | 268 |
|
---|
[ed30f09] | 269 | </sect2>
|
---|
[73ddd1a0] | 270 |
|
---|
[2ddf71a5] | 271 | <sect2 role="commands">
|
---|
| 272 | <title>Command Explanations</title>
|
---|
| 273 |
|
---|
[2d37d32] | 274 | <para>
|
---|
[f19b432b] | 275 | <command>rm -rf zlib </command>: <application>zlib</application>
|
---|
| 276 | was installed as part of LFS.
|
---|
[2d37d32] | 277 | </para>
|
---|
| 278 |
|
---|
| 279 | <para>
|
---|
[2bb5c32] | 280 | <parameter>--disable-compile-inits</parameter>: This option makes
|
---|
[933ceec] | 281 | <command>gs</command> and <filename>libgs.so</filename> slightly smaller.
|
---|
[2d37d32] | 282 | </para>
|
---|
| 283 |
|
---|
| 284 | <para>
|
---|
[142f958b] | 285 | <parameter>--with-system-libtiff</parameter>: Remove this option if
|
---|
| 286 | you've not installed <xref linkend="libtiff"/>.
|
---|
[2d37d32] | 287 | </para>
|
---|
| 288 |
|
---|
| 289 | <para>
|
---|
[81f0120] | 290 | <command>install -v -m644 base/*.h... </command>: Some packages
|
---|
[2d37d32] | 291 | (<application>ImageMagick</application> is one) need the
|
---|
| 292 | <application>Ghostscript</application> interface headers in place to link
|
---|
| 293 | to the shared library. These commands install the headers.
|
---|
| 294 | </para>
|
---|
| 295 |
|
---|
| 296 | <para>
|
---|
[eff6c3a8] | 297 | <command>ln -sfvn ghostscript /usr/include/ps</command>: Some packages
|
---|
[2d37d32] | 298 | expect to find the interface headers in an alternate location.
|
---|
| 299 | </para>
|
---|
| 300 |
|
---|
| 301 | <para>
|
---|
[12341a8] | 302 | <command>mv -v /usr/share/doc/ghostscript/&gs-version;
|
---|
| 303 | /usr/share/doc/ghostscript-&gs-version;</command>: This moves the
|
---|
| 304 | documentation where it is expected to be found.
|
---|
[2d37d32] | 305 | </para>
|
---|
[933ceec] | 306 |
|
---|
| 307 | <para>
|
---|
| 308 | <option>--disable-cups</option>: this option will save a tiny amount of
|
---|
| 309 | space by not linking <command>gs</command> and <filename>libgs.so</filename>
|
---|
| 310 | to the <xref linkend="cups"/> libraries if you have installed those.
|
---|
| 311 | </para>
|
---|
[2ddf71a5] | 312 | </sect2>
|
---|
| 313 |
|
---|
[ed30f09] | 314 | <sect2 role="content">
|
---|
| 315 | <title>Contents</title>
|
---|
[038ea6ba] | 316 | <segmentedlist>
|
---|
| 317 | <segtitle>Installed Programs</segtitle>
|
---|
| 318 | <segtitle>Installed Library</segtitle>
|
---|
| 319 | <segtitle>Installed Directories</segtitle>
|
---|
| 320 |
|
---|
| 321 | <seglistitem>
|
---|
[2d37d32] | 322 | <seg>
|
---|
[0e390db] | 323 | dvipdf, eps2eps, gs, gsbj, gsc (from soinstall), gsdj,
|
---|
[81f0120] | 324 | gsdj500, gslj, gslp, gsnd, gsx (from soinstall), lprsetup.sh,
|
---|
| 325 | pdf2dsc, pdf2ps, pf2afm, pfbtopfa, pphs, printafm, ps2ascii,
|
---|
| 326 | ps2epsi, ps2pdf, ps2pdf12, ps2pdf13, ps2pdf14, ps2pdfwr,
|
---|
[0e390db] | 327 | ps2ps, ps2ps2, and unix-lpr.sh
|
---|
[933ceec] | 328 | <!-- I don't see bdftops,fixmswrd.pl or pv.sh on my builds [ I don't
|
---|
| 329 | have any bdf tools from xorg ] but they are still referenced in
|
---|
| 330 | base/unixinst.mak -->
|
---|
[2d37d32] | 331 | </seg>
|
---|
[81f0120] | 332 | <seg>libgs.so and
|
---|
| 333 | /usr/lib/ghostscript/&gs-version;/X11.so</seg>
|
---|
[2d37d32] | 334 | <seg>
|
---|
| 335 | /usr/include/ghostscript,
|
---|
| 336 | /usr/lib/ghostscript,
|
---|
[019052a1] | 337 | /usr/share/ghostscript, and
|
---|
[2d37d32] | 338 | /usr/share/doc/ghostscript-&gs-version;
|
---|
| 339 | </seg>
|
---|
[038ea6ba] | 340 | </seglistitem>
|
---|
| 341 | </segmentedlist>
|
---|
| 342 |
|
---|
| 343 | <variablelist>
|
---|
| 344 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 345 | <?dbfo list-presentation="list"?>
|
---|
| 346 | <?dbhtml list-presentation="table"?>
|
---|
| 347 |
|
---|
[d891148c] | 348 | <varlistentry id="gplgs-prog">
|
---|
[038ea6ba] | 349 | <term><command>gs</command></term>
|
---|
| 350 | <listitem>
|
---|
[2d37d32] | 351 | <para>
|
---|
| 352 | is an interpreter for Adobe Systems' PostScript(tm) and Portable
|
---|
| 353 | Document Format (PDF).
|
---|
| 354 | </para>
|
---|
[d891148c] | 355 | <indexterm zone="gs gplgs-prog">
|
---|
[038ea6ba] | 356 | <primary sortas="b-gs">gs</primary>
|
---|
| 357 | </indexterm>
|
---|
| 358 | </listitem>
|
---|
| 359 | </varlistentry>
|
---|
| 360 |
|
---|
[d891148c] | 361 | <varlistentry id="libgs.so">
|
---|
| 362 | <term><filename class="libraryfile">libgs.so</filename></term>
|
---|
| 363 | <listitem>
|
---|
[2d37d32] | 364 | <para>
|
---|
| 365 | provides <application>Ghostscript</application> functionality to
|
---|
| 366 | other programs, such as <application>GSView</application>,
|
---|
| 367 | <application>ImageMagick</application>, and
|
---|
| 368 | <application>libspectre</application>.
|
---|
| 369 | </para>
|
---|
[d891148c] | 370 | <indexterm zone="gs libgs.so">
|
---|
| 371 | <primary sortas="c-libgs.so">libgs.so</primary>
|
---|
| 372 | </indexterm>
|
---|
| 373 | </listitem>
|
---|
| 374 | </varlistentry>
|
---|
[038ea6ba] | 375 | </variablelist>
|
---|
| 376 |
|
---|
[2d37d32] | 377 | <para>
|
---|
[0c32749] | 378 | <application>Ghostscript</application> provides many different
|
---|
[2d37d32] | 379 | scripts used to convert PostScript, PDF, and other formats. Please refer to
|
---|
| 380 | the HTML documentation or the man pages for information about the
|
---|
| 381 | capabilities provided.
|
---|
| 382 | </para>
|
---|
[ed30f09] | 383 | </sect2>
|
---|
[cabb2de] | 384 | </sect1>
|
---|