Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
pdftops in Ghostscript mode should use the "ps2write" output device of Ghostscript #3766
In the upcoming Ghostscript 9.01 (to be released end of Feb 2011) the "ps2write" output device will produce DSC-conforming PostScript (gives PASS with current cupstestdsc) and therefore the old "pswrite" will get deprecated. Especially the old "pswrite" turns text characters into bitmaps and so output files will get huge which easily causes crashes of PostScript printers. The new "ps2write" handles text correctly and so files will not blow up. In addition, "pswrite" will most probably not get maintained any more.
Therefore I recommend that in the pdftops filter the "ps2write" output device of Ghostscript gets used when compiled in Ghostscript mode. Or better a check in ./configure should be done to check which Ghostscript version is installed and in case of 9.01 or newer "ps2write" should be used, otherwise "pswrite".
CUPS.org User: h.blischke
Why not augment the pdf2dsc.ps utility of Ghostscript in that it dumps the contents of the pdfpage dictionary to the specified output file? A wrapper script around Ghostscript could dump the necessary PS code fom the .../Resources/Init/xxx.ps files.
This would this solution make widely independent of the Ghostscript release in use (note that many Linux ditros still stick to 8.6x versions).
Postscriptum: I already have a procset that dumps PS objects; it only needs to be extended to dump fonts and images.
CUPS.org User: till.kamppeter
"ps2write" exists in older versions of Ghostscript, but the output was not DSC-conforming, so not suitable for further manipulation by pstops.
Therefore I recommend a check in ./configure and let "ps2write" only being used if GS is version 9.01 or newer.
#! /bin/sh /usr/share/dpatch/dpatch-run
use-gs-with-ps2write-device.dpatch by email@example.com
All lines beginning with `## DP:' are a description of the patch.
DP: No description.
--- config-scripts/cups-pdf.m4 (revision 9747)
if test "x$CUPS_PDFTOPS" != x; then
+if test "x$CUPS_GHOSTSCRIPT" != x; then