操作系统:DVD版的 debian11 电脑:联想笔记本 网络:WIFI同一网络 打印机:HP ColorLaserJet MFP M278-M281 无线打印机
图形化操作,无需安装相关驱动。



然后会提示在安装驱动,稍后提示未找到驱动程序。不过在“打印设置”里,已经出现打印机,打了一张测试页,居然成功了。


可以正常打印,不实现扫描功能,就需要安装驱动 hplip 了,具体见下面文章链接。
其他参考资料:
debian11 linux 添加安装惠普打印机 HP ColorLaserJet MFP M278-M281 http://phpsrc.com/os/linux/202112/159.html
linux 惠普扫描命令 hp-scan 用法详解 http://phpsrc.com/os/linux/202112/160.html
debian11 linux 安装惠普打印机驱动 hplip | linux 惠普打印机扫描功能的实现 http://phpsrc.com/os/linux/202112/161.html
debian linux 打印机相关命令详解 lp lpr lpstat http://phpsrc.com/os/linux/202112/162.html
重启打印机:
sudo /etc/init.d/cups restart
访问打印机: http://localhost:631/

打印相关配置文件: /etc/cups/cupsd.conf
打印相关的命令:lp、lpr、lpstat、lpq
lpstat //print cups status information



lpq //show printer queue status

lp 与 lpr 大同小异
phpsrc.com@phpsrc:~$ lpr --help Usage: lpr [options] [file(s)] 选项: -# num-copies Specify the number of copies to print -E Encrypt the connection to the server -H server[:port] Connect to the named server and port -m Send an email notification when the job completes -o option[=value] Specify a printer-specific option -o job-sheets=standard Print a banner page with the job -o media=size Specify the media size to use -o number-up=N Specify that input pages should be printed N-up (1, 2, 4, 6, 9, and 16 are supported) -o orientation-requested=N Specify portrait (3) or landscape (4) orientation -o print-quality=N Specify the print quality - draft (3), normal (4), or best (5) -o sides=one-sided Specify 1-sided printing -o sides=two-sided-long-edge Specify 2-sided portrait printing -o sides=two-sided-short-edge Specify 2-sided landscape printing -P destination Specify the destination -q Specify the job should be held for printing -r Remove the file(s) after submission -T title Specify the job title -U username Specify the username to use for authentication
lprm //cancel print jobs

phpsrc.com@phpsrc:~$ lprm --help Usage: lprm [options] [id] lprm [options] - 选项: - Cancel all jobs -E Encrypt the connection to the server -h server[:port] Connect to the named server and port -P destination Specify the destination -U username Specify the username to use for authentication
phpsrc.com@phpsrc:~$ lp --help Usage: lp [options] [--] [file(s)] lp [options] -i id 选项: -c Make a copy of the print file(s) -d destination Specify the destination -E Encrypt the connection to the server -h server[:port] Connect to the named server and port -H HH:MM Hold the job until the specified UTC time -H hold Hold the job until released/resumed -H immediate Print the job as soon as possible -H restart Reprint the job -H resume Resume a held job -i id Specify an existing job ID to modify -m Send an email notification when the job completes -n num-copies Specify the number of copies to print -o option[=value] Specify a printer-specific option -o job-sheets=standard Print a banner page with the job -o media=size Specify the media size to use -o number-up=N Specify that input pages should be printed N-up (1, 2, 4, 6, 9, and 16 are supported) -o orientation-requested=N Specify portrait (3) or landscape (4) orientation -o print-quality=N Specify the print quality - draft (3), normal (4), or best (5) -o sides=one-sided Specify 1-sided printing -o sides=two-sided-long-edge Specify 2-sided portrait printing -o sides=two-sided-short-edge Specify 2-sided landscape printing -P page-list Specify a list of pages to print -q priority Specify the priority from low (1) to high (100) -s Be silent -t title Specify the job title -U username Specify the username to use for authentication
|