我已按照此处的说明为标签打印机安装了打印机驱动程序:http://www.linux-hardware-guide.com/2014-10-22-brother-ql-700-标签打印机-usb
我注意到的一件事是打印机驱动程序依赖于 32 位 libstdc++
我能够使用 Ubuntu 自带的 Gnome 图像查看器程序打印具有一定透明度的 png,但是当我尝试使用 Java 或 lpr 打印相同的图像时,如果行为相同,则作业会失败并停留在队列中,并显示“发送数据失败”状态。
在杯子里error_log
,我能够看到 imagetopdf 正在崩溃。
D [21/Mar/2017:23:58:37 -0400] [Job 37] Loading USB quirks from \"/usr/share/cups/usb\".
D [21/Mar/2017:23:58:37 -0400] [Job 37] Loaded 131 quirks.
D [21/Mar/2017:23:58:37 -0400] [Job 37] Printing on printer with URI: usb://Brother/QL-700?serial=000G6Z433508
D [21/Mar/2017:23:58:37 -0400] [Job 37] libusb_get_device_list=8
D [21/Mar/2017:23:58:37 -0400] [Job 37] STATE: +connecting-to-device
D [21/Mar/2017:23:58:37 -0400] [Job 37] Page = 82x255; 4,8 to 78,246
D [21/Mar/2017:23:58:37 -0400] [Job 37] PNG image: 250x250x8, color_type=3 (RGB+PALETTE)
D [21/Mar/2017:23:58:37 -0400] [Job 37] *** Error in `Brother-QL-700\': free(): invalid next size (normal): 0x0000000000fdd5e0 ***
D [21/Mar/2017:23:58:37 -0400] [Job 37] ======= Backtrace: =========
D [21/Mar/2017:23:58:37 -0400] [Job 37] /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7fd2b1eae7e5]
D [21/Mar/2017:23:58:37 -0400] [Job 37] /lib/x86_64-linux-gnu/libc.so.6(+0x7fe0a)[0x7fd2b1eb6e0a]
D [21/Mar/2017:23:58:37 -0400] [Job 37] /lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7fd2b1eba98c]
D [21/Mar/2017:23:58:37 -0400] [Job 37] /usr/lib/x86_64-linux-gnu/libcupsfilters.so.1(_cupsImageReadPNG+0x3c7)[0x7fd2b220f597]
D [21/Mar/2017:23:58:37 -0400] [Job 37] /usr/lib/x86_64-linux-gnu/libcupsfilters.so.1(cupsImageOpen+0x421)[0x7fd2b2209801]
D [21/Mar/2017:23:58:37 -0400] [Job 37] Brother-QL-700[0x401e40]
D [21/Mar/2017:23:58:37 -0400] [Job 37] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7fd2b1e57830]
D [21/Mar/2017:23:58:37 -0400] [Job 37] Brother-QL-700[0x404629]
D [21/Mar/2017:23:58:37 -0400] [Job 37] ======= Memory map: ========
D [21/Mar/2017:23:58:37 -0400] [Job 37] 00400000-00409000 r-xp 00000000 08:01 55837711 /usr/lib/cups/filter/imagetopdf
... memory map elided
D [21/Mar/2017:23:58:37 -0400] [Job 37] 7ffdc1acb000-7ffdc1acd000 r-xp 00000000 00:00 0 [vdso]
D [21/Mar/2017:23:58:37 -0400] [Job 37] ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
D [21/Mar/2017:23:58:37 -0400] [Job 37] STATE: -connecting-to-device
D [21/Mar/2017:23:58:37 -0400] [Job 37] Printer found with device ID: MFG:Brother;CMD:PT-CBP;MDL:QL-700;CLS:PRINTER; Device URI: usb://Brother/QL-700?serial=000G6Z433508
D [21/Mar/2017:23:58:37 -0400] [Job 37] Device protocol: 2
D [21/Mar/2017:23:58:37 -0400] [Job 37] Sending data to printer.
D [21/Mar/2017:23:58:37 -0400] [Job 37] Set job-printer-state-message to "Sending data to printer.", current level=INFO
D [21/Mar/2017:23:58:37 -0400] [Job 37] Usage: file [-bcEhikLlNnprsvzZ0] [--apple] [--extension] [--mime-encoding] [--mime-type]
D [21/Mar/2017:23:58:37 -0400] [Job 37] [-e testname] [-F separator] [-f namefile] [-m magicfiles] file ...
D [21/Mar/2017:23:58:37 -0400] [Job 37] file -C [-m magicfiles]
D [21/Mar/2017:23:58:37 -0400] [Job 37] file [--help]
D [21/Mar/2017:23:58:37 -0400] [Job 37] PID 27534 (/usr/lib/cups/filter/imagetopdf) crashed on signal 6.
D [21/Mar/2017:23:58:37 -0400] [Job 37] Hint: Try setting the LogLevel to "debug" to find out more.
我已将打印机连接到 Mac,并安装了适当的驱动程序,如果我使用 lpr 打印,一切运行正常,尽管我还没有在 Mac 上尝试过 Java,但这并不重要。
我认为可能存在问题的一件事是 imagetopdf 显然使用的是 64 位 libstdc++,但如果它是一个单独的版本,那么它与打印机驱动程序分开的事实应该意味着它不应该发生这样的冲突。但是,安装 32 位 libstdc++ 是否可能会破坏其他东西?
知道这里发生了什么事以及如何解决吗?
谢谢!