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 (Ghostscript bug #690178). To get them rendered correctly, Ghostscript 8.63 needs 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 this patch, and second, it is too verbose in CUPS' "debug" logging mode, also corrected by a patch.
The CUPS drivers for PCL-XL printers which come with Ghostscript do not accept PDF input. To solve this, apply this patch. Independent whether you use these drivers in a PostScript or PDF printing workflow, you need to apply the patches for the "pxlmono"/"pxlcolor" driver so that the option settings from the PPD get obeyed.
Please also apply the 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 bug which prevents Ghostscript's CUPS Raster output device ("cups") from working with PDF input data. There is a patch available to fix it. With this patch applied the 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 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.