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