Package: psutils Version: 1.17-32 Severity: minor Tags: patch When -W or -H is passed to psnup, the relevant dimension is also used for the output paper size, regardless of any explicit or implicit paper size passed to the program.
I attach a simple patch which only sets the output paper size from the input paper size if no output size (explicit or implicit) is given. The maintainers may wish to change this so that implicit output paper sizes (e.g. via libpaper) are also overridden, although I would counsel against this, as the man page gives no hint that setting the input size will also set the output size. (In a perfect world, I'd remove this setting of the output size from the input size altogether, but I've avoided that to retain some degree of backwards compatibility, even though in practice on a Debian system there will always be an /etc/papersize, so the output size will always default to that.) -- System Information: Debian Release: wheezy/sid APT prefers quantal-updates APT policy: (500, 'quantal-updates'), (500, 'quantal-security'), (500, 'quantal') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.5.0-17-generic (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages psutils depends on: ii libc6 2.15-0ubuntu20 ii libpaper1 1.1.24+nmu2 Versions of packages psutils recommends: ii ghostscript 9.06~dfsg-0ubuntu4 psutils suggests no packages. -- no debconf information
--- psutils-1.17/psnup.c 2012-12-05 00:01:28.000000000 +0000 +++ psutils-1.17-rrt/psnup.c 2012-12-04 23:48:58.059464287 +0000 @@ -265,9 +265,9 @@ scanpages(sizeheaders); /* set default values of input height & width */ - if ( iwidth > 0 ) + if ( iwidth > 0 && width == -1 ) width = iwidth ; - if ( iheight > 0 ) + if ( iheight > 0 && height == -1 ) height = iheight ; /* Finding the best layout is an optimisation problem. We try all of the