14 September 2010

CUPS page size error on HP laserjet

From today's experience, I found that it might be caused by wrong PCL option. When I chose PCL6 the page size printed was only halfsized. But after I chose PCL4/5 it was OK.


Printing using command line is the following(watch out the CAPITAL P for specifying page!):
For two sides:
lp -d dest_print -o media=a4 -o sides=two-sided-long-edge -P 1-3 file.pdf


For two sides, each side two pages (for this setting the page numbering is strange, e.g. for printing page 1 to 8 you write -P 1-4, for 15-22 write -P 8-11, and the sides SHORT option is important to prevent having upside down pages):
lp -d dest_print -o media=a4 -o sides=two-sided-short-edge -o number-up=2  -P 1-4 file.pdf