我正在使用 cups-pdf 通过 lpd(端口 515)进行打印,到目前为止,这一切正常,但所有 pdf 文件都是使用打印机配置的内容创建的。 PDF 文件包括以下内容:
Media Limits: 0.00 x 0.00 to 8.26 x 11.69 inches
Job ID: PDFPrinter003-197
Driver: CUPS-PDF.PPD
Driver Version: 1.1
Description: SAP2PDF
Driver Version: SAP2PDF
Make and Model: Generic CUPS-PDF Printer (no options)
Printer: PDFPrinter003
Created at: Tue Jun 27 12:42:12 2017
Printed at: Tue Jun 27 12:42:12 2017
我在日志文件中找不到任何有趣的内容。 /var/log/cups/cups-pdf-PDFPrinter003_log 中包含有关 PDF 创建的所有内容。
在 /var/log/cups/error_log 中如下:
W [27/Jun/2017:13:00:11 +0200] CreateProfile failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
W [27/Jun/2017:13:00:11 +0200] CreateProfile failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
W [27/Jun/2017:13:00:11 +0200] CreateDevice failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
W [27/Jun/2017:13:00:38 +0200] CreateProfile failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
W [27/Jun/2017:13:00:38 +0200] CreateProfile failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
W [27/Jun/2017:13:00:38 +0200] CreateDevice failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
W [27/Jun/2017:13:00:46 +0200] Unexpected 'document-format' operation attribute in a Create-Job request.
W [27/Jun/2017:13:00:46 +0200] Unexpected 'document-name' operation attribute in a Create-Job request.
我的 xinetd.conf lpd 打印部分如下:
service printer
{
socket_type = stream
protocol = tcp
wait = no
user = lp
server = /usr/lib/cups/daemon/cups-lpd
}
请询问是否缺少某些东西。
你有好主意吗?
格雷茨·埃尔多·O
答案1
解决了:
这是 lpd 的一个“功能”。默认情况下,lpd 打印一个“横幅”并创建 2 个假脱机文件。第一个假脱机文件已打印,但它只是横幅,第二个文件被 cups-pdf 忽略。
我必须禁用 xinetd.conf 中的横幅
server_args = -o document-format=application/octet-stream -o job-sheets=none,none
这解决了我的问题。