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
Share:
12,728
Petr
Author by

Petr

Updated on September 18, 2022

Comments

  • Petr
    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?

  • n0pe
    n0pe about 11 years
    Could you add a solution? Maybe the command to run to convert an image to greyscale.
  • casualunixer
    casualunixer over 2 years
  • Admin
    Admin about 2 years
    The question is not about Raspberry.
  • Admin
    Admin almost 2 years
    But as raspberry is Linux based. So the options would be same, I hope.