Problem
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.
My Approach
I finally used the lpr
command to print the picture because
commands won’t change like buttons in GUI programs.
lpr foo.png
: printfoo.png
with 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 inhttp://localhost:631
. I don’t know why the section “Image Options” can’t be found in the CUPS manual. - One can use
lpoptions -l
for 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.
Lessons learnt
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
-
See this forum post for details. ↩
-
See Command-Line Printing in Linux in the IT Knowledge Base of the University of Tennessee System. ↩
-
See PPI vs. DPI: what’s the difference? by Alex Bigman in 99designs. ↩