Printer: Xprinter XP-58IIH
指令支持: ESC/POS
接口: USB, 蓝牙
Linux系统: Arch Linux
$ sudo pacman -Qi cups
Name : cups
Version : 2.2.11-1
Description : The CUPS Printing System - daemon package
Architecture : x86_64
URL : https://www.cups.org/
Licenses : GPL
Groups : None
Provides : None
Depends On : acl pam libcups>=2.2.11 cups-filters bc dbus systemd
libpaper hicolor-icon-theme
Optional Deps : xdg-utils: xdg .desktop file support [installed]
colord: for ICC color profile support [installed]
Required By : None
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 13.92 MiB
Packager : Andreas Radke <andyrtr@archlinux.org>
Build Date : Sun 24 Mar 2019 06:39:26 PM CST
Install Date : Sun 07 Apr 2019 05:07:53 PM CST
Install Reason : Explicitly installed
Install Script : Yes
Validated By : Signaturephp
https://www.ibm.com/developerworks/cn/linux/l-lpic1-108-4/index.html
管理打印机和打印 Ian Shields 2018 年 3 月 14 日发布
CUPS 原先为通用 UNIX 打印系统 (Common UNIX Printing System) 的首字母缩写,是 Linux 的打印机和打印做业管理器。
System 也有一个打印守护程序。它的功能相似于 Berkeley LPD,但采用不一样的命令集。您将会常常看到两种具备不一样选项但完成相同任务的命令。
例如,来自 Berkeley 实施的 lpr和来自 System V 实施的 lp 均可打印文件。
CUPS 打印系统的核心是做为守护进程运行的 cupsd 打印服务器。
html
CUPS 配置文件一般位于 /etc/cups/cupsd.conf 中。
原先 cupsd.conf 中容许的文件、目录和用户配置指令,如今改成存储在 cups-files.conf 中。这样可防止某些类型的特权升级攻击。
前端
$ sudo cat /etc/cups/cups-files.conf
# Location of the file listing all of the local printers...
#Printcap /etc/printcaplinux
自动生成的 /etc/printcap 文件。这是 LPD 打印服务器的配置文件名称,部分应用仍使用它来肯定可用的打印机及其属性。
$ sudo cat /etc/printcap
# This file was automatically generated by cupsd(8) from the
# /etc/cups/printers.conf file. All changes to this file
# will be lost.
Xprint|Xprint:rm=tompc:rp=Xprint:git
$ sudo cat /etc/cups/printers.conf
# Printer configuration file for CUPS v2.2.11
# Written by cupsd on 2019-04-09 14:41
# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING
<Printer Xprint>
UUID urn:uuid:192cdccd-05bc-3ef7-4582-c6233773ef56
Info Xprint
Location pc
MakeModel Zijiang ZJ-58
DeviceURI usb://Unknown/Printer?serial=?
State Idle
StateTime 1554792072
ConfigTime 1554792065
Type 53252
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>
github
https://zh.wikipedia.org/zh-hans/假脱机
假脱机(外部设备联机并行操做,SPOOL,Simultaneous Peripheral Operations On-line)是一种数据缓冲,指传输数据的过程当中,将数据存放在临时工做区中。
最多见的假脱机的应用是打印缓存,即把打印任务加入到队列。
根据文件系统层次结构标准 (FHS),假脱机文件默认状况下存储在 /var/spool 文件系统中。shell
Local Printers本地链接: 数据库
Network Printers网络连接:ubuntu
Backend Error Handler beh 后端错误处理程序
https://wiki.linuxfoundation.org/openprinting/database/backenderrorhandler
下载 beh.txt 脚本:http://www.openprinting.org/download/files/beh
当CUPS后端和打印机之间的通讯出现错误时,CUPS禁用打印队列!!!
对于桌面/家庭用户来讲, 这常常发生,一般家用打印机只会在偶尔须要使用时才打开。
而常常发送打印任务后,才发现打印机还没开,或网线没有插...这时候就须要重新启用打印服务...
此类问题能够经过安装beh脚本解决,此脚本使得后端错误处理可配置:
让队列根本不被禁用。简单的方法,但工做会丢失。
重复给定次数。
常常无限重复,直到工做最终经过。这是LPRng的标准,它消除了工做的损失。
也能够配置两次尝试运行后端之间的时间间隔。
对每一个打印队列独立完成配置。所以,能够区别对待本地打印机和网络打印机。
只需下载脚本,将其复制到CUPS后端目录(一般/usr/lib/cups/backend/),而后使用“ chmod 755 beh。
而后从新启动它注册新后端的CUPS,一般使用“ killall -HUP cupsd”或“/etc/init.d/cups restart”。
若是你作的都正确,那么在“ beh”的输出中必须有一行包含“ lpinfo -v”。
beh是一个包装器,由CUPS调用代替一般的后端,beh如今称为后端。
这种方式beh能够根据其配置重复调用后端,或者只是隐藏后端的错误状态,使其不被CUPS守护程序看到。
后端
要使用打印队列beh,请获取root并调用命令,以下所示:
lpadmin -p <queue name> -E -v beh:/<dd>/<att>/<delay>/<originaluri>
全部参数,特别是<dd>,<att>和<delay>一直被指定,即便其中一人是没有意义的,因为其余的设置。
beh与除了每一个后端工做hp从后端HPLIP。若是beh与hp后端一块儿使用,HP Toolbox将没法再找到打印机。
示例URI:
beh:/1/3/5/socket://printer:9100
在主机名为“ printer” 的网络打印机上,尝试访问3次,尝试之间有5秒的延迟。若是做业仍然失败,则不会禁用队列(并丢弃做业)。
beh:/0/10/60/socket://printer:9100
每隔一分钟重试10次,在仍未成功时禁用队列。
beh:/1/0/60/usb://Brother/HL-5040%20series
在USB上的Brother HL-5040上无限次地尝试,直到打印机返回,间隔为一分钟。这样,当打印机关闭时,做业不会丢失,而且能够经过简单地关闭打印机来有意地延迟打印。桌面打印机和/或家庭用户的理想配置。
这里将安装在 Arch Linux 系统上。其余Linux系统主要是安装命令有差别,其余命令基本相同。
$ sudo pacman -S cups //安装在Arch Linux系统上使用pacman命令。
$ sudo systemctl start org.cups.cupsd //启动
$ sudo systemctl status org.cups.cupsd //查看状态
$ sudo systemctl enable org.cups.cupsd //设置开启启动
lpinfo 命令还可帮助您识别可用设备类型和驱动程序。使用 -v 选项可列出受支持的设备,-m 选项可列出驱动程序。
$ lpinfo -m |grep hp
$ lpinfo -m |grep epson
drv:///sample.drv/epson9.ppd Epson 9-Pin Series
drv:///sample.drv/epson24.ppd Epson 24-Pin Series
所有列出,不方便查看,加上过滤条件,如上,没找到hp的打印机驱动,但有2个Epson的驱动。若是使用相似方式找到里匹配你正在使用的打印机,能够跳过下一节(添加更多的驱动。)
请访问 OpenPrinting.org(参阅相关主题),查看是否有用于您的特定打印机的驱动程序。
Foomatic:Linux Foundation的OpenPrinting工做组的foomatic为许多打印机驱动程序提供PPD,包括free和nonfree。有关foomatic的功能的更多信息,请参阅Developer's View中的Foomatic。
要使用foomatic,请安装foomatic-db-engine以及至少如下之一:
$ sudo pacman -S foomatic-db-engine
$ sudo pacman -S foomatic-db-ppds //安装好这个预建的PPD文件, 有(60Mb)多,有好几千个打印机驱动了。
“PPD文件”(PostScript打印机描述文件)
再使用过滤条件列出已添加的驱动,找到匹配的驱动后,就能够进入下一节了,若是仍是没有,上面4选1,把试过没有的卸载掉,继续尝试其余的,也能够挨个儿所有安装,添加更多的驱动再找。
$ lpinfo -m |grep 过滤关键字
https://www.computerhope.com/unix/ulpadmin.htm
https://www.computerhope.com/unix/ulp.htm
https://www.computerhope.com/unix/ulpstat.htm
*lpr 会以静默方式实现做业假脱机,而 lp 则会显示假脱机做业的编号
*lp 具备与 lpr 类似的选项,但名称可能不一样;例如,lpr 上的 -# 与 lp 上的 -n 等效
lpr 的选项选项 及 用途
lpq - 列出可用打印机的状态,列出打印做业。
lprm - 从打印队列中删除请求。
lpstat - 列出LP打印服务的状态。
lpstat -d; lpstat -v HL-2280DW; lpstat -s; lpstat -a XP-610; lpstat -p -a;
$ lpstat -s
system default destination: XPRINT
device for XPRINT: usb://Unknown/Printer?serial=?
$ lpstat -p
printer XPRINT disabled since Mon 08 Apr 2019 05:10:17 PM CST -
reason unknown
可经过 cupsaccept 和 cupsreject 命令控制是启用仍是禁用排队
可经过 cupsenable 和 cupsdisable 命令控制是启用仍是禁用打印
#cupsdisable queue_name //停用打印机
#cupsenable queue_name //激活打印机
#cupsaccept queue_name //将打印机设置为接受做业
$ lpoptions -d xxx //设置默认打印机
$ lpoptions -p xxx -l //列出选项 List the options
$ lpoptions -p xxx -o option=value //设置一个选项 Set an option
好比:$ lpoptions -p HP_DESKJET_940C -o PageSize=A4
掌握了基本信息后,安装了cups,找到了打印机驱动,就可使用 lpadmin 命令来配置打印机.
命令行方式 适用于几乎全部打印机
从新插拔USB设备后运行,列出最近的设备变更信息。
$ dmesg --color=always |tail
以USB打印机为例,使用 lpinfo命令查找打印机的uri。
$ sudo lpinfo -v
...
direct usb://Unknown/Printer?serial=?
这里找到就是USB打印机的uri了,不一样的打印机,这里会很不同。
注:能够先不插USB,执行以上命令;再插上USB打印机,再执行以上命令,这样就很容易分辨了。
$ /usr/lib/cups/backend/snmp ip_address #使用SNMP查找URI
使用$ lpinfo -m命令加过滤找到打印机驱动model
$ lpinfo -m |grep 58
lsb/usr/cupsfilters/zj58.ppd Zijiang ZJ-58
若是正好找到了,就能够跳到下一节添加打印机了。
参照3.2 添加更多的驱动
而后再lpinfo1 -m查找,大部分都能经过以上方式或打印机厂商网站找到。
若是以上方式都没有适合的驱动,正好买到了小众的打印机,有些国产或者山寨等,也能够向店家请教。
好比这里找到了github上的驱动。
https://github.com/klirichek/zj-58
下载,参照readme的指导安装便可
$ sudo pacman -S cmake //安装编译工具
下载,解压缩.
$ cd /home/toma/Downloads/xp/zj58 //进入解压缩的目录
$ mkdir build //创建构建二进制用的目录
$ cmake /home/toma/Downloads/xp/zj58 //编译
$ sudo make install //安装
...
[100%] Linking C executable rastertozj
[100%] Built target rastertozj
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/lib/cups/filter/rastertozj
-- Installing: /usr/share/cups/model/zjiang/zj58.ppd
-- Installing: /usr/share/cups/model/zjiang/xp58.ppd
-- Installing: /usr/share/cups/model/zjiang/tm20.ppd
-- Installing: /usr/share/cups/model/zjiang/zj80.ppd
$ lpinfo -m |grep xp58
zjiang/xp58.ppd J-speed XP-58
$ sudo lpadmin -p queue_name -E -v uri -m model
queue_name, 改成打印机名称。
uri,前面lpinfo找到的字符串。
model,前面找到的打印机驱动,指定PPD文件。
https://lists.cups.org/pipermail/cups/2004-December/031341.html
有两种方法能够指定PPD:-m标准模型 或 -P绝对路径的ppd文件
"-m ppdfile.ppd”或“-m subdir/ppdfile.ppd"这个“-m”参数
指定标准的CUPS“模型”(一般位于“/usr/share/cups/model/”)或者在子目录中
“在/usr/share/cups/model/subdir/”。就是使用lpinfo -m找到的ppd文件。
注:指定标准模型或PPD文件,如上只须要使用文件名,或子目录\文件名便可,不须要注明具体的路径。
另注:查看当前ArchLinux系统的ppd文件在这里:/usr/share/ppd/cupsfilters/
“-P /path/to/ppdfile.ppd”或“-P ../path/to/ppdfile.ppd”。这个“-P”
参数采用绝对或相对路径来查找 ppdfile.ppd。这类是标准库里找不到,从其余地方获取的,须要手动指定,则须要绝对路径,好比:/home/toma/Download/zj58.ppd
https://wiki.archlinux.org/index.php/CUPS 上的添加示例
本机添加(错误尝试记录):
$ sudo lpadmin -p Xprint -E -v "usb://Unknown/Printer?serial=?" -m zj58.ppd
lpadmin: Unable to copy PPD file.
注:zj58.ppd并非标准库里的,我是从github上找到的,手动复制到标准模型的目录下,
$ sudo cp zj58.ppd /usr/share/ppd/cupsfilters/zj58.ppd
而后使用-m指定ppd文件来添加打印机,结果报错:“没法复制PPD文件”。
这时就须要使用-P指定绝对路径的方式了:
$ sudo lpadmin -p Xprint -E -v "usb://Unknown/Printer?serial=?" -P /usr/share/ppd/cupsfilters/zj58.ppd
添加成功后,会将ppd文件复制到/etc/cups/ppd/Xprint.ppd
单纯指定一个ppd文件,能够添加成功,查看打印机状态也OK,但发送打印任务永远都是stoped状态。
正确的方式是标准库里的PPD模型,或者下载厂商提供的驱动程序,我这里使用的是第三方驱动,(20190412添加)
5.2.2 安装第三方驱动
这是再查找出 -v, -m 参数,而后添加打印机:
$ sudo lpinfo -v
direct usb://Unknown/Printer?serial=?
$ lpinfo -m |grep xp58
zjiang/xp58.ppd J-speed XP-58
$ sudo lpadmin -p Xprint58 -E -v "usb://Unknown/Printer?serial=?" -m zjiang/xp58.ppd
$ lpstat -s
no system default destination
device for Xprint58: usb://Unknown/Printer?serial=?
[toma@tompc build]$ lpstat -p
printer Xprint58 is idle. enabled since Fri 12 Apr 2019 11:41:10 AM CST
[toma@tompc build]$
$ lpoptions -d Xprint58
copies=1 device-uri=usb://Unknown/Printer?serial=? finishings=3 job-cancel-after=10800 job-hold-until=no-hold job-priority=50 job-sheets=none,none marker-change-time=0 number-up=1 printer-commands=none printer-info=Xprint58 printer-is-accepting-jobs=true printer-is-shared=true printer-is-temporary=false printer-location printer-make-and-model='J-speed XP-58' printer-state=3 printer-state-change-time=1555040470 printer-state-reasons=none printer-type=53252 printer-uri-supported=ipp://localhost/printers/Xprint58
$ lpstat -p
printer Xprint58 is idle. enabled since Fri 12 Apr 2019 11:41:10 AM CST
[toma@tompc build]$ lpstat -s
system default destination: Xprint58
device for Xprint58: usb://Unknown/Printer?serial=?
#列出选项
$ lpoptions -p Xprint58 -l
PageSize/Media Size: *X48MMY65MM X48MMY105MM X48MMY210MM X48MMY297MM X48MMY3276MM Custom.WIDTHxHEIGHT
CutMedia/Cut Media: *None EndOfPage EndOfJob
OptionCash1/Cash drawer 1: *False True
OptionCash2/Cash drawer 2: *False True
OptionCutter/Cutter: *False True
FeedDist/Feed distance: 0feed3mm 1feed6mm *2feed9mm 3feed12mm 4feed15mm 5feed18mm 6feed21mm 7feed24mm 8feed27mm 9feed30mm 10feed33mm 11feed36mm 12feed39mm 13feed42mm 14feed45mm
FeedWhere/When to feed: None AfterPage *AfterJob
BlankSpace/Blank space at page's end: True *False
CashDrawer1Setting/Cash Drawer 1: *None 1BeforePrinting 1AfterPrinting
CashDrawer2Setting/Cash Drawer 2: *None 2BeforePrinting 2AfterPrinting
CashDrawer1PulseOn/Cash Drawer 1 pulse ON time: None 10XMS 20XMS 30XMS *40XMS 50XMS 60XMS 70XMS 80XMS
CashDrawer1PulseOff/Cash Drawer 1 pulse OFF time: None 10XMS 20XMS 30XMS 40XMS *50XMS 60XMS 70XMS 80XMS
CashDrawer2PulseOn/Cash Drawer 2 pulse ON time: None 10XMS 20XMS 30XMS *40XMS 50XMS 60XMS 70XMS 80XMS
CashDrawer2PulseOff/Cash Drawer 2 pulse OFF time: None 10XMS 20XMS 30XMS 40XMS *50XMS 60XMS 70XMS 80XMS
Resolution/Resolution: *203x203dpi
激活打印机
#cupsenable Xprint58
将打印机设置为接受做业
#cupsaccept Xprint58
$ lpstat -s
system default destination: Xprint58
device for Xprint58: usb://Unknown/Printer?serial=?
$ lpstat -p
printer Xprint58 is idle. enabled since Sun 07 Apr 2019 09:37:27 PM CST
禁用打印机后再查看情况
#cupsenable Xprint
$ lpstat -p
printer Xprint disabled since Sun 07 Apr 2019 09:54:03 PM CST -
Unable to send data to printer.
$ lpr file
$ lpr -# 17 file # print the file 17 times
$ echo 'Hello, world!' | lpr -p # print the result of a command. The -p switch adds a header.
列出打印队列
$ lpq
$ lpq -a # on all queues
移除打印任务
# lprm # remove last entry only
# lprm - # remove all entries
部分厂商提供独立的打印驱动安装程序,参照厂商说明安装好驱动,而后打开CUPS的网页添加打印机便可。
http://127.0.0.1:631
首先将其设置为拒绝全部传入的条目:
$ sudo cupsreject XPRINT
$ lpstat -p
printer XPRINT disabled since Mon 08 Apr 2019 05:10:17 PM CST -
Rejecting Jobs
而后禁用它。
$ sudo cupsdisable XPRINT
$ lpstat -p
printer XPRINT disabled since Mon 08 Apr 2019 05:10:17 PM CST -
Paused
最后删除它。
$ sudo lpadmin -x XPRINT
$ lpstat -p
lpstat: No destinations added.
$ lpstat -s
no system default destination
lpstat: No destinations added.
lpstat: No destinations added.
https://www.cups.org/faq.html
https://www.cups.org/doc/options.html
http://localhost:631/help
https://en.wikipedia.org/wiki/CUPS
Printer name is "Xprinter", model: XP-58IIH. Support USB and Bluetooth.
https://github.com/klirichek/zj-58
Zj-58, Zj-80 and other receipt printers
CUPS filter for cheap thermal receipt printers as Zijiang ZJ-58, XPrinter XP-58, JZ-80 with cutter, Epson TM-T20, and may be any other printers understanding ESC/POS commands.
Originally it was reverse-engineered filter for Zijiang zj-58 with it's specific PPD, but later it is revealed that it actually works with many other cheap 58mm printers, like Xprinter XP-58.
https://github.com/klirichek/zj-58/blob/master/zj58.ppd
https://wiki.ubuntu.com/DebuggingPrintingProblems
Debugging Printing Problems
打开终端/控制台并检查是否加载了usb内核模块:
$ lsmod | grep usb
检查USB子系统是否正确检测到打印机并肯定其USB供应商/产品ID以及USB总线和设备地址:
$ lsusb
注意:若是关闭或拔下打印机电源,USB总线和设备地址会发生变化。若是须要,请从新运行此命令。
检查打印机的设备文件是否已建立,全部权(“root lp”)和权限(非HP:“crw-rw-r--”,HP:“crw-rw-r - +”)是否正确设置:
$ ls -l /dev/usb/lp*
$ ls -l /dev/bus/usb/*/*
https://wiki.archlinux.org/index.php/CUPS
https://wiki.archlinux.org/index.php/CUPS/Printer-specific_problems
https://wiki.gentoo.org/wiki/Printing
https://wiki.debian.org/Printing
https://wiki.debian.org/SystemPrinting
http://www.openprinting.org/download/kpfeifle/LinuxKongress2002/Tutorial/VII.cups-help/VII.cups-help.html
(VII。)故障排除 - CUPS-并寻求帮助HOWTO(绝望指南)
https://www.cups.org/documentation.html
http://127.0.0.1:631/admin/log/error_log?
E [09/Apr/2019:10:23:28 +0800] [cups-driverd] Unable to open \"/usr/share/cups/model/zj58.ppd\" - No such file or directory
/usr/share/cups/model/zj58.ppd
E [09/Apr/2019:20:34:56 +0800] Xprint: File \"/usr/lib/cups/filter/rastertozj\" not available: No such file or directory
/usr/lib/cups/filter/rastertozj
https://wiki.linuxfoundation.org/openprinting/database/foomatic
https://wiki.linuxfoundation.org/openprinting/database/cupsdocumentation
Foomatic计划分为三个部分:
数据库
该数据库包含许多XML文件,这些文件详细说明了如何执行给定的打印机驱动程序。有两个前端使用这些文件:(1)人类可读的前端生成全部“执行细节”页面上显示的信息; (2)PPD-O-Matic PPD生成器计算Adobe兼容的PPD文件,您须要配置打印队列。
PPD文件
数据库生成的PPD文件包含有关重要打印机功能,可用选项以及如何构建渲染器(一般为Ghostscript)命令行的全部信息,具体取决于用户对选项的选择。foomatic-rip读取它以了解如何执行打印做业。GUI前端读取它以构建用户能够调整选项的对话框。除了一般的东西,PPD文件包含以“* Foomatic ...”开头的各类额外行。这些包含驱动程序命令行的详细信息,选项是否接受任意数字(而不只仅是PPD文件中列出的选项)等信息。CUPS和应用程序忽略了这些额外的行。
过滤器
过滤脚本'foomatic-rip'由CUPS调用,具备各类输入; 输入包括PPD文件名和用户选择的各类选项。foomatic-rip打开PPD,提取全部选项及其可能的设置,还提供命令行以使用适当的驱动程序执行Ghostscript。它解析PostScript打印文件以进行选项设置。这些选项设置可能已被CUPS或应用程序填入; foomatic-rip自己还会在打印数据流中插入其余PostScript代码,以便根据须要设置选项。它还将标准CUPS选项类型按摩为数据库使用的更通用的打印机/驱动程序特定格式。
https://wiki.linuxfoundation.org/openprinting/database/cupsprintingtutorial
本教程介绍了使用CUPS打印的基础知识,包括
设置本地(USB,并行)PostScript和非PostScript打印机
多功能设备
为以太网链接的打印机分配IP地址
在网络中共享打印机
高可用性 - 冗余CUPS队列和服务器
使用Samba将打印机共享到Windows机器
和更多 …
http://www.openprinting.org/download/kpfeifle/LinuxKongress2002/Tutorial/II.Foomatic-User/II.tutorial-handout-foomatic-user.html
(II。)从用户的角度看起来颇有用:
在Foomatic的帮助下安装打印机
设置打印机的一个大问题是使假脱机程序调用正确的过滤器并使用户能够控制打印机的功能。大多数GNU / Linux发行版使用本身的工具,这些工具一般不支持最新的打印机型号,也只能访问很是基本的驱动程序选项。
为了改善这种状况,Printing-HOWTO的做者Grant Taylor创建了一个数据库,用于提供有关免费软件打印机驱动程序以及打印机以及如何使用免费软件支持它们的信息。这个名为Foomatic的数据库位于linuxprinting.org上而我目前正在维护它。如今,数据库列出了全部免费软件打印机驱动程序及其命令行和全部可用选项以及全部打印机,咱们能够获取有关它们支持程度的信息。数据库是用XML实现的,Perl脚本能够自动建立配置文件,甚至能够为全部已知的免费缓冲器完成打印机队列:LPD,LPRng,GNUlpr,CUPS,PPR,PDQ和无后台打印。经过这些队列,用户能够访问所使用的打印机驱动程序的所有功能,并得到与假脱机程序无关的用户界面,以便他能够以相同的方式操做全部的假脱机程序。
http://www.linuxprinting.org/
http://www.openprinting.org/download/
http://www.openprinting.org/download/kpfeifle/LinuxKongress2002/Tutorial/II.Foomatic-User/II.Foomatic-User.pdf
https://wiki.linuxfoundation.org/openprinting/start
https://wiki.linuxfoundation.org/openprinting/database/foomatic
https://wiki.linuxfoundation.org/openprinting/database/aboutfoomatic
Foomatic是一个数据库驱动的系统,用于在Unix下将免费软件打印机驱动程序与常见的解析器集成。
它支持CUPS,LPRng,LPD,GNUlpr,Solaris LP,PPR,PDQ,CPS,以及咱们已知的每一个免费软件打印机驱动程序以及已知使用这些驱动程序的每一个打印机的直接打印。
https://en.opensuse.org/Concepts_printing
https://en.opensuse.org/SDB:CUPS_in_a_Nutshell
跨平台的办公软件LibreOffice自带PDF输出,因此大部分需有直接在这里就能实现了。如下是CUPS的cups-pdf的软件包,能够直接输出为PDF文件。https://wiki.archlinux.org/index.php/CUPSIf you intend to "print" into a PDF document, also install the cups-pdf package. By default, pdf files are stored in /var/spool/cups-pdf/username/. The location can be changed in /etc/cups/cups-pdf.conf.$ sudo pacman -S cups-pdfhttp://distro.ibiblio.org/smeserver/contribs/rvandenaker/testing/smeserver-cups/documentation/howtos/cups-pdf-printer.html