%general-entities; ]> $Date$ ghostscript-&gs-version; Ghostscript Introduction to Ghostscript Ghostscript is a versatile processor for PostScript data with the ability to render PostScript to different targets. It is a mandatory part of the cups printing stack. &lfs110a_checked; Package Information Download (HTTP): Download (FTP): Download MD5 sum: &gs-md5sum; Download size: &gs-size; Estimated disk space required: &gs-buildsize; Estimated build time: &gs-time; Additional Downloads Required patch: If you wish, you can download additional fonts. Standard Fonts Download (HTTP): Download MD5 sum: &gs-standard-fonts-md5sum; Download size: &gs-standard-fonts-size; Other Fonts Download (HTTP): Download MD5 sum: &gs-other-fonts-md5sum; Download size: &gs-other-fonts-size; Ghostscript Dependencies Recommended (required for building the cups device backend, which is needed by cups-filters), (required, if you are installing any suggested font), , , , , and Optional , , , , and User Notes: Installation of Ghostscript The Ghostscript build system is not user-friendly. In order to use system copies of various graphics libraries, you must do it using unconventional methods. Ghostscript includes (old) copies of several libraries. Some of these seem to have been patched to fix known vulnerabilities, but others of these copies are less-well maintained. To ensure that any future fixes are applied throughout the whole system, it is recommended that you first install the released versions of these libraries and then configure Ghostscript to link to them. If you have installed the recommended dependencies on your system, remove the copies of freetype, lcms2, libjpeg, libpng, and openjpeg: rm -rf freetype lcms2mt jpeg libpng openjpeg Apply a patch to prevent a segfault when processing some PDF files and to fix a public 0-day in libgs which can be exploited via ImageMagick: patch -Np1 -i ../ghostscript-&gs-version;-upstream_fix-2.patch Compile Ghostscript: rm -rf zlib && ./configure --prefix=/usr \ --disable-compile-inits \ --enable-dynamic \ --with-system-libtiff && make The shared library depends on . It is only used by external programs like , , , and . To compile the shared library libgs.so, run the following additional command as an unprivileged user: make so This package does not come with a test suite. A set of example files may be used for testing, but it is only possible after installation of the package. Now, as the root user: make install If you want the shared library too: make soinstall && install -v -m644 base/*.h /usr/include/ghostscript && ln -sfvn ghostscript /usr/include/ps Now make the documentation accessible from a standard place: mv -v /usr/share/doc/ghostscript/&gs-version; /usr/share/doc/ghostscript-&gs-version; && rm -rfv /usr/share/doc/ghostscript && cp -r examples/ /usr/share/ghostscript/&gs-version;/ If you have downloaded the fonts, unpack them to /usr/share/ghostscript and ensure the ownership of the files are root: root. tar -xvf ../ghostscript-fonts-std-8.11.tar.gz -C /usr/share/ghostscript --no-same-owner && tar -xvf ../gnu-gs-fonts-other-6.0.tar.gz -C /usr/share/ghostscript --no-same-owner && fc-cache -v /usr/share/ghostscript/fonts/ You can now test the rendering of various postscript and pdf files from the /usr/share/ghostscript/&gs-version;/examples . To do this, run the following command (in a X Windows display): gs -q -dBATCH /usr/share/ghostscript/&gs-version;/examples/tiger.eps Command Explanations rm -rf zlib : zlib was installed as part of LFS. --disable-compile-inits: This option makes gs and libgs.so slightly smaller. --with-system-libtiff: Remove this option if you've not installed . install -v -m644 base/*.h... : Some packages (ImageMagick is one) need the Ghostscript interface headers in place to link to the shared library. These commands install the headers. ln -sfvn ghostscript /usr/include/ps: Some packages expect to find the interface headers in an alternate location. mv -v /usr/share/doc/ghostscript/&gs-version; /usr/share/doc/ghostscript-&gs-version;: This moves the documentation where it is expected to be found. : this option will save a tiny amount of space by not linking gs and libgs.so to the libraries if you have installed those. Contents Installed Programs Installed Library Installed Directories dvipdf, eps2eps, gs, gsbj, gsc (from soinstall), gsdj, gsdj500, gslj, gslp, gsnd, gsx (from soinstall), lprsetup.sh, pdf2dsc, pdf2ps, pf2afm, pfbtopfa, pphs, printafm, ps2ascii, ps2epsi, ps2pdf, ps2pdf12, ps2pdf13, ps2pdf14, ps2pdfwr, ps2ps, ps2ps2, and unix-lpr.sh libgs.so and /usr/lib/ghostscript/&gs-version;/X11.so /usr/include/ghostscript, /usr/lib/ghostscript, /usr/share/ghostscript, and /usr/share/doc/ghostscript-&gs-version; Short Descriptions gs is an interpreter for Adobe Systems' PostScript(tm) and Portable Document Format (PDF) gs libgs.so provides Ghostscript functionality to other programs, such as GSView, ImageMagick, and libspectre libgs.so Ghostscript provides many different scripts used to convert PostScript, PDF, and other formats. Please refer to the HTML documentation or the man pages for information about the capabilities provided.