A month ago, I wanted to print a picture. However, I didn’t know how to use GUI programs like LibreOffice or GIMP to print images with their actual size. I know that this can be easily done in M$ Paint.1
Nonetheless, as a free software supporter, I should refuse using proprietary softwares and seek free alternatives.
I finally used the
lpr command to print the picture because
commands won’t change like buttons in GUI programs.
lpr foo.png: print
foo.pngwith the default page size, and the picture will fit the page.
lpr --natural-scale=nn%: It took me an hour to find out this option is the true answer to my question. I googled “print actual size of picture linux” and entered a page in a knowledge base.2 Actually, the contents are the same as those in
http://localhost:631. I don’t know why the section “Image Options” can’t be found in the CUPS manual.
- One can use
lpoptions -lfor viewing the list of the default printer settings, and one may modify it through the CUPS’s web interface. For example, one may use the option
-o Resolution=Photo. Note that it’s case sensitive.
PPI and DPI are different. The former is about the printer and is independent of the picture, while the later is for controlling the printing size of the picture.3