7

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?

Petr
  • 1,624
  • 2
  • 19
  • 35

4 Answers4

9

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
GHugo
  • 792
  • 4
  • 10
1

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
Ian Mackinnon
  • 660
  • 1
  • 7
  • 14
0

Open cups window in Raspberry pi os

menu > preferences > Print Settings > select your printer > Properties >

Printer Options > Color Model > Grayscale
-1

You will have to convert the image to a grayscale version, by e.g GraphicsMagick or ImageMagick.

vonbrand
  • 18,156
  • 2
  • 37
  • 59