![cups-pdf 通过 cups-lpd 创建除打印机配置外没有任何内容的 PDF 文件](https://linux22.com/image/114283/cups-pdf%20%E9%80%9A%E8%BF%87%20cups-lpd%20%E5%88%9B%E5%BB%BA%E9%99%A4%E6%89%93%E5%8D%B0%E6%9C%BA%E9%85%8D%E7%BD%AE%E5%A4%96%E6%B2%A1%E6%9C%89%E4%BB%BB%E4%BD%95%E5%86%85%E5%AE%B9%E7%9A%84%20PDF%20%E6%96%87%E4%BB%B6.png)
我正在使用 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
这解决了我的问题。