[Pkg-cups-devel] Bug#686671: cups-filters: pdftops filter does not remove -number-up printer option
David Purton
dcpurton at marshwiggle.net
Tue Sep 4 14:12:22 UTC 2012
Package: cups-filters
Version: 1.0.18-2+b1
Severity: normal
Tags: upstream patch
Dear Maintainer,
I believe there is a bug in pdftops.c
Page layout options like nup printing are now handled by pdftopdf.
However pstops also handles this. pdftops, which should be run in
between pdftopdf and pstops is supposed to remove the options that
pdftopdf has already applied.
However, the option "-number-up" is not removed by pdftops. The result
is that nup printing is applied twice when printing to a PostScript
printer (the CUPS PDF virtual printer is also affected), once by
pdftopdf and once by pstops.
This bug is due to the way function remove_options searches for options
to remove. When searching for "-number-up", "-number-up-layout" is
found, since (at least sometimes) this is on the command line before
"-number-up". Function remove_options is clever enough to know that
"-number-up-layout" is different to "-number-up", but not clever enough
to keep searching for "-number-up" after "-number-up-layout" is found.
Although a more robust solution is to fix remove_options, a simple
solution is to get remove_options to search for (and remove)
"-number-up-layout" be "-number-up" is searched for. This can easily be
done by reversing the order of these two options in the
pstops_exclude_page_management array in pdftops.c.
Hope that helps!
David
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 3.2.0-3-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages cups-filters depends on:
ii fonts-freefont-ttf [ttf-freefont] 20120503-1
ii fonts-liberation 1.07.2-5
ii ghostscript 9.05~dfsg-6
ii libc6 2.13-33
ii libcups2 1.5.3-1
ii libcupsfilters1 1.0.18-2+b1
ii libcupsimage2 1.5.3-1
ii libfontconfig1 2.9.0-6
ii libgcc1 1:4.7.1-2
ii libijs-0.35 0.35-8
ii liblcms2-2 2.2+git20110628-2.2
ii libpoppler19 0.18.4-3
ii libstdc++6 4.7.1-2
ii ttf-dejavu 2.33-2
ii ttf-freefont 20120503-1
ii zlib1g 1:1.2.7.dfsg-13
Versions of packages cups-filters recommends:
ii colord 0.1.21-1
ii foomatic-filters 4.0.17-1
ii ghostscript-cups 9.05~dfsg-6
Versions of packages cups-filters suggests:
ii foomatic-db-compressed-ppds [foomatic-db] 20120523-1
-- no debconf information
More information about the Pkg-cups-devel
mailing list