UPDATE
It appears the lpr in the lpr
package is not the one that works with cups. The questions is, how do I get the cups version of lpr
installed?
Old Question
lpr on ubuntu 10.04 includes an option "-o" that lets you pass extra options. lpr on 14.04 does not include this option.
Our application that we are moving relies on lpr and the ability to set certain options so that pages print correctly.
The command is:
lpr -P PrinterName -o orientation-requested=3 -o position=top-left
-o media=Letter -o page-left=0 -o page-right=0 -o page-top=0
-o page-bottom=0 /path/to/file.pdf
Worked fine on the old version but on the new server it fails with:
usage: lpr [-cdfghlmnpqrstv] [-#num] [-1234 font] [-C class] [-i [numcols]]
[-J job] [-Pprinter] [-T title] [-U user] [-wnum] [name ...]
So -o was removed? How do we pass options to lpr if the options option was removed?
which lpr
shows/usr/bin/lpr
. It was installed withapt-get install lpr
. There is anlprng
package too. On the old server the man page says "Apple, Inc" and the new one says "BSD General Commands Manual". Maybe they swapped them for licensing reasons?lpr
is part of cups. I do have cups installed. The online man page (cups.org/documentation.php/man-lpr.html) shows the -o option still exists, so I guess the question is, how do I get the rightlpr
installed, the one that works with cups options?dpkg-query -S /usr/bin/lpr
say?