GNU/Linux & OS-X CUPS and printer commands
Cups lets you manage printers and printing
lpstat
list printers and their devices
# lpstat -v
device for myoki: lpd://prnt002.ri/lp
device for myxerox: lpd://prnt009.ri/lp
list printers & status's
# lpstat -p
printer hp1320 is idle. enabled since Thu 10 Jul 16:12:30 2008
printer Phaser_7400DN is idle. enabled since Thu 10 Jul 13:35:29 2008
list default printer
$ lpstat -d
system default destination: prnt002.ri
lpoptions
set (User) default printer
lpoptions
show options
$ lpoptions -p hp1320
media=A4 sides=one-sided finishings=3 copies=1 job-hold-until=no-hold job-priority=50 number-up=1 auth-info-required=none job-sheets=none,none printer-info=hp1320 printer-is-accepting-jobs=1 printer-is-shared=0 printer-location=hp1320 printer-make-and-model='HP LaserJet 1320 series' printer-state=3 printer-state-change-time=1215702750 printer-state-reasons=none printer-type=2134100 page-border=single InputSlot=Tray2 PageRegion=A4 HPOption_Tray2=True HPOption_PaperPolicy=NearestSizeAdjust PageSize=A4 MediaType=Plain Resolution=600x600dpi
show options long
$ lpoptions -p hp1320 -l
HPOption_Tray2/Tray 2: *True False
HPOption_Tray3/Tray 3: True *False
HPOption_PaperPolicy/Fit to Page: PromptUser *NearestSizeAdjust NearestSizeNoAdjust
InstalledMemory/Total Printer Memory: *16_31MB 32_47MB 48_79MB 80_143MB 144MB
HPStraightPaperPath/Alternate Output Bin Is Open (Straight Paper Path): True *False
PageSize/Page Size: Letter LetterSmall Executive Legal LegalSmall *A4 A4Small A5 A6 B6 ISOB5 B5 Postcard DoublePostcard w558h774 Env10 EnvMonarch EnvDL EnvC5 EnvISOB5 Custom
number-up and page-border
set (Global/System/Default) options print 2 pages per physical page and print a border
# lpoptions -p myoki -o number-up=2 -o page-border=single
page margins
page-top, page-left, page-bottom, page-right (in 1/72" points)
# lpoptions -p myxerox -o page-top=16 -o page-left=16 -o page-bottom=16 -o page-right=16
lpoptions as root
When run by the root user, lpoptions gets and sets default options and instances for all users in the /etc/cups/lpoptions file.
apple mac os x (only) enscript
$ enscript --line-numbers --font=Koufi6 index.php
FILES
CUPS: /etc/cups/printers.conf (contains 'CUPS' default)
User: ~/.cups/lpoptions (contains 'User' default & options)
Global/System/Default: /etc/cups/lpoptions (contains 'root' default & options)
EXAMPLE
verify your lp options
$ cat /etc/cups/lpoptions
Default prnt002.ri number-up=2 page-border=single
Dest prnt009.ri number-up=2 page-border=single
REFERRERS
CentOSPrinting
Printing
XubuntuPrinting
There are no comments on this page. [Add comment]