如何列印 Ghostscript 程式的輸出

如何列印 Ghostscript 程式的輸出

請問,在 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.

它在螢幕上很好地顯示了矩形,但在印表機或其列印佇列中沒有任何內容。

我可能在這裡遺漏了一些明顯的東西,有人可以幫忙嗎?如果這個問題已經在某個地方被問過並得到了回答,我們深表歉意。

相關內容