请问,在 Linux 中,如何将 Ghostscript 程序的输出直接输出到我的 HP LaserJet 打印机?我的最终目标是绘制按比例绘制的地图自然地球数据。
打印机的测试页非常完美,毫米刻度与我的尺子完全匹配,因此用于生成打印机输出的软件必须已经存在。
这是我的测试程序,绘制一个 86.6 (x) x 173.2 (y) mm 的矩形
%!
/Helvetica findfont 36 scalefont setfont
/mm { 25.4 div 72 mul }def
newpath
50.8 mm 101.6 mm moveto
50.8 mm 101.6 mm 173.2 mm add lineto
50.8 86.6 add mm 101.6 173.2 add mm lineto
50.8 86.6 add mm 101.6 mm lineto
closepath
stroke
showpage
这就是我尝试过的方法和结果。由于我没有使用文本,所以到目前为止我忽略了错误消息:
% gs -sOutputFile=HP_LaserJet_Professional_P_1102w GhostScript/Grid02.ps
GPL Ghostscript 9.14 (2014-03-26)
Copyright (C) 2014 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Can't find (or can't open) font file /usr/share/ghostscript/9.14/Resource/Font/NimbusSanL-Regu.
Can't find (or can't open) font file NimbusSanL-Regu.
Can't find (or can't open) font file /usr/share/ghostscript/9.14/Resource/Font/NimbusSanL-Regu.
Can't find (or can't open) font file NimbusSanL-Regu.
Querying operating system for font files...
Loading NimbusSanL-Regu font from /usr/share/fonts/default/Type1/n019003l.pfb... 3561652 2191972 5250028 3908193 1 done.
>>showpage, press <return> to continue<<
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
after 62 requests (62 known processed) with 0 events remaining.
它在屏幕上很好地显示了矩形,但在打印机或其打印队列中没有任何内容。
我可能在这里遗漏了一些明显的东西,有人可以帮忙吗?如果这个问题已经在某个地方被问过并得到了回答,我们深表歉意。