Date: Mon, 17 Jul 2006 22:40:31 GMT From: Nathan Whitehorn <nathanw@uchicago.edu> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/100451: [PATCH] CUPS 1.2 pdftops produces invalid postscript Message-ID: <200607172240.k6HMeVwG080115@www.freebsd.org> Resent-Message-ID: <200607172250.k6HMoGQI035313@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 100451 >Category: ports >Synopsis: [PATCH] CUPS 1.2 pdftops produces invalid postscript >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jul 17 22:50:16 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Nathan Whitehorn >Release: 6.1-STABLE >Organization: University of Chicago >Environment: FreeBSD czernobog.somethingpretentious.net 6.1-STABLE FreeBSD 6.1-STABLE #5: Wed May 10 10:12:36 CDT 2006 root@czernobog.somethingpretentious.net:/usr/obj/usr/src/sys/CZERNOBOG i386 >Description: The CUPS pdftops filter's "Produced by xpdf/pdftops..." header is inserted without a postscript comment. This causes printing the job to fail on a wide range of printers with an "Unknown operand: Produced" error or something similar. >How-To-Repeat: Print any pdf document using CUPS 1.2. >Fix: writePSFmt() uses sprintf(), which removes lone % signs (except on Linux, which apparently is the only system on which ESP tested this). As such, the comment prefix is removed and the job fails. Adding more % signs (there should properly be two in the final output) fixes the problem. --- PSOutputDev.cxxold Mon Jul 17 16:23:04 2006 +++ PSOutputDev.cxx Mon Jul 17 16:22:56 2006 @@ -1158,7 +1158,7 @@ break; } + writePSFmt("%%%% Produced by xpdf/pdftops %s\n", xpdfVersion); - writePSFmt("% Produced by xpdf/pdftops %s\n", xpdfVersion); xref->getDocInfo(&info); if (info.dictLookup("Creator", &obj1)->isString()) { writePS("%%Creator: "); >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607172240.k6HMeVwG080115>