======pdf_with_ghostscript_8.63====== ===== Patching Ghostscript 8.63 for the PDF printing workflow===== In general, you should use Ghostscript 8.64 (or newer) for PDF-based printing, but if you cannot do the upgrade to the new version for some reason, you can fix the most important bugs by applying patches. In Ghostscript 8.63 many bugs on PDF rendering where fixed, but there are still bugs breaking the PDF-based printing workflow for many users. First, some PDF files have unusual color decode arrays ([[http://bugs.ghostscript.com/show_bug.cgi?id=690178|Ghostscript bug #690178]]). To get them rendered correctly, Ghostscript 8.63 needs [[http://www.openprinting.org/download/printing/ghostscript-pdf-patches/onebitcmyk-pdf.patch|this patch]]. If a CUPS Raster driver is used, Ghostscript uses its "cups" output device. Once the "cups" device does not work with PDF input and also does not pass the Duplex option on to the driver, both issues are fixed with [[http://www.openprinting.org/download/printing/ghostscript-cups-patches/cups-output-device-pdf-duplex-uninitialized-memory.patch|this patch]], and second, it is too verbose in CUPS' "debug" logging mode, also corrected by a [[http://www.openprinting.org/download/printing/ghostscript-cups-patches/cups-device-logging.patch|patch]]. The CUPS drivers for PCL-XL printers which come with Ghostscript do not accept PDF input. To solve this, apply this [[http://www.openprinting.org/download/printing/ghostscript-cups-patches/pstopxl-pdf-input.patch|patch]]. Independent whether you use these drivers in a PostScript or PDF printing workflow, you need to apply [[http://www.openprinting.org/download/printing/ghostscript-pxl-patches/|the patches for the "pxlmono"/"pxlcolor" driver]] so that the option settings from the PPD get obeyed. Please also apply the [[http://www.openprinting.org/download/printing/ghostscript-bjc600-bjc800-patches/bjc600-bjc800-pdf.patch|patch for the "bjc600"/"bjc800" drivers]] so that Ghostscript does not crash on PDF input when using these drivers. Unfortunately, Ghostscript 8.63 has also a [[http://bugs.ghostscript.com/show_bug.cgi?id=690101|bug]] which prevents Ghostscript's CUPS Raster output device ("cups") from working with PDF input data. There is a [[http://www.openprinting.org/download/printing/ghostscript-cups-patches/cups-output-device-pdf-duplex-uninitialized-memory.patch|patch]] available to fix it. With this patch applied the [[http://www.openprinting.org/download/printing/pdf-printing/pdftoraster.c|Ghostscript-based pdftoraster]] filter actually works. Compile the filter with gcc -I/usr/include/cups -o pdftoraster -lcups -lcupsimage pdftoraster.c and copy the resulting binary file pdftoraster into /usr/lib/cups/filter/. Download also [[http://www.openprinting.org/download/printing/pdf-printing/pdftoraster.convs|pstoraster.convs]] and put it into the /etc/cups/ directory. Make it world-readable. Ghostscript 8.64 has all these problems fixed and it already includes the pdftoraster filter. You do not need the patches there.