将定制 LPD 滤波器集成到 CUPS 中

将定制 LPD 滤波器集成到 CUPS 中

我已经建立了一个新的打印服务器,我们尝试使用 CUPS,而不是使用 LPD。旧的 LPD 服务器具有用 C 语言编写的自定义过滤器,需要将其应用于新的 CUPS 服务器。问题是我不确定这是如何完成的。

Printers.conf 文件具有使用 Mime 类型的“过滤器”选项。我不知道要使用哪种 Mime 类型(如果有的话)。我知道我需要在该打印机的 ppd 文件中包含过滤器脚本位置,然后编辑 Printer.conf 文件,但我不确定如何进行。在旧的打印服务器上,我们将编辑 printcap 文件,但在新服务器上,CUPS 将在进行任何更改后编辑该文件。

[root@printserver cups]# cat /etc/cups/printers.conf
# Printer configuration file for CUPS v1.4.2
# Written by cupsd on 2014-08-28 11:59
# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING
<Printer Printer1>
Info Printer1
Location 9L
MakeModel Ricoh Aficio MP C2050 PS
DeviceURI lpd://destination_server/Printer1
State Idle
StateTime 1409252319
Type 8433916
Filter application/vnd.cups-raw 0 -
Filter application/vnd.cups-postscript 0 foomatic-rip
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>



[root@printserver ppd]# grep cupsFilter Printer1.ppd

*cupsFilter: "application/vnd.cups-postscript 0 foomatic-rip"

旧服务器 printcap 文件:

Printer1:\
:ml#0:\
:mx#0:\
:sd=/var/spool/lpd/Printer1:\
:af=/var/spool/lpd/Printer1/Printer1.acct:\
:sh:\
:rm=destination_server:\
:rp=Printer1:

相关内容