Bug#745056: cups-filters-core-drivers: scaling=NN and fitplot options have no effect
Hello Sanjoy; thank you for your detailed report. Time has moved on and
I am using cups 1.7.5-11 and cups-filters 1.0.61-5 to repeat your tests.
On Thu 17 Apr 2014 at 12:07:43 -0400, Sanjoy Mahajan wrote:
> The scaling=NN and fitplot options now seem to have no effect. For
> example, I printed the hplip testpage to an LaserJet 400 (M401dw)
>
> $ lp -d lj400 -o PageSize=Letter -o scaling=50 /usr/share/hplip/data/ps/testpage.ps.gz
>
> and it came out full sized instead of covering one-quarter of the page
> (50 percent in each dimension). Similarly, I printed an oversize pdf
> using '-o fitplot' and only a piece of the page came out.
>
> It seems that the filter chain is not doing anything with the scaling=50
> option. The filter chain is:
>
> [Job 4751] 3 filters for job:
> [Job 4751] pstopdf (application/postscript to application/pdf, cost 0)
> [Job 4751] pdftops (application/pdf to application/vnd.cups-postscript, cost 66)
> [Job 4751] hpps (application/vnd.cups-postscript to printer/test, cost 0)
This is very puzzling. You are sending PostScript to a PostScript
printer and for some time now the only filter which should be used is
pstops. An explanation for this behaviour is at
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=712237
> I made a print-to-file queue with:
>
> lpadmin -p test -E -v file:/tmp/printout -P /etc/cups/ppd/lj400.ppd
>
> and printed to it with
>
> lp -d test -o PageSize=Letter -o scaling=50 /usr/share/hplip/data/ps/testpage.ps.gz
>
> I've attached /tmp/printout and lj400.ppd.
>
> You can see (with gv, after taking out the jcl wrapper) that the ps part
> of the file is full sized (not shrunk).
>
> I see the same problem with a HP PSC 2700 and with a CUPS PDF print
> queue. (As a test of the debugging chain, the CUPS PDF print queue
> correctly handles the -o number-up=2.)
>
> Looking in the source for cups-filters 1.0.50, I don't see any code in
> pdftops.cc that would handle the scaling option. I see code in
> pdftopdf.cc that might do it, but (1) it is commented out, and (2)
> pdftopdf isn't part of the filter chain.
I too observe no scaling. pstops is an upstream cups file so it would be
reasonable to assume the comments in "Image Options" at
http://localhost:631/help/options.html
apply.
fitplot is fit-to-page nowadays.
/usr/sbin/cupsfilter -m appliaction/vnd.cups-postscript -p lj400.ppd -o fit-to-page -o PageSize=A4 testpage.ps.gz > out.ps
gives me out.ps which I can send to my PS printer with "-o raw". It
prints perfectly.
Since Wheezy pdftopdf has changed and fit-to-page and scaling are not
handled by that filter in quite the same way now. But pdftopdf is not
invoked with lj400.ppd. I did not test with the HP PSC 2700 because I
could not find it.
Regards,
Brian.
Reply to: