HP Scan Cheatsheet
If you have an HP printer (which have great Linux support), and you have installed the hplip tool, you will have access to the
hp-scan tool, which will trigger a scanning job of your printer.
By default, the tool will scan quickly in greyscale to a file called hpscanXXX.png where XXX are a set of numbers to give a unique value.
I prefer to output in color, and a .jpg file instead, so the command I would use most frequently is:
hp-scan \ --mode=color \ --size=a4 \ --compression=jpeg
If you want it in grayscale, then you can do the following, but such a mode will not allow saving as a .jpg file.
Specify Output File
If you wish to specify where the file should be saved to, just add the
--output flag like so:
hp-scan \ --mode=color \ --compression=jpeg \ --output=my-file.jpg
Of course there is shorthand too:
hp-scan -m=color -x=jpeg -o=my-file.jpg
If you want to send the image in an email, use the following:
hp-scan \ --mode=color \ --compression=jpeg \ ---email@example.com \ --email-subject="subject here" \ --email-msg="Your scan is attached" \ --email-to="firstname.lastname@example.org"
First published: 30th June 2021