This section explains how to print a file directly from a terminal software by specifying the print file without starting the application software.
You can perform the printing with the following methods:
Lpr Command
In the lpr command, you can specify a file of any data format that CUPS supports, such as PS, BMP, TIFF, or JPEG.
For details about the data formats that CUPS supports, see the homepage for the Common UNIX Printing System (http://www.cups.org/).
When you use the lpr command to print a file, enter the command as follows:
[user@zzz /yyy]$ lpr -P [printer_name] [filename] {-o option}
If you change a printer setting through the CUPS Web interface, the new value becomes the default. If you do not enter a registered printer name, the default printer is used. |
Example: Printing Sample.png in grayscale
[user@zzz /yyy]$ lpr -P MB5300USB Sample.png -o CNGrayscale
Example: Printing Sample.png with A5 Page Size
[user@zzz /yyy]$ lpr -P MB5300USB Sample.png -o PageSize=a5
Usage Restrictions of the lpr command
1. If you print an image file directly with the lpr command, the image may be printed on the multiple pages. If this happens, adjust the image size.
2. If you print a PostScript file with the lpr command, CUPS places that PostScript file at the top left corner of the print area and converts the file as defined by the PostScript file. If the size of the PostScript file is larger than the Page Size, the protruded area is not be printed.