How to force lp from CUPS to print in grayscale?
12,728
Solution 1
Maybe you are looking for lpoptions
?
Use lpoptions -l
in order to know what's the name for your printer.
You can play it like thi (example with an HP Photosmart) :
lp -o scaling=//100// -oColorModel=KGray image.jpg
Solution 2
If you look in the PPD file for the current printer, you should get a hint of how to denote grayscale printing (or any option for that matter). It could be as above or ColorModel=Gray
, ColorModel=Grayscale
, etc.
Try the following command to search the options for printers on your system:
grep -i gr[ae]y /etc/cups/ppd/*.ppd
Author by
Petr
Updated on September 18, 2022Comments
-
Petr over 1 year
I want to print an image from a command line:
lp -o scaling=//100// image.jpg
How can I force it to be printed in grayscale?
-
Admin over 4 yearsSee also unix.stackexchange.com/a/18449/77539
-
-
n0pe about 11 yearsCould you add a solution? Maybe the command to run to convert an image to greyscale.
-
casualunixer over 2 years@n0pe, try: stackoverflow.com/q/13317753
-
Admin about 2 yearsThe question is not about Raspberry.
-
Admin almost 2 yearsBut as raspberry is Linux based. So the options would be same, I hope.