1. 我的作法供您參考
cat xxx.txt | /usr/local/bin/bg5ps -tm 0 -bm 0 | lpr -P lq2070c
2. bg5ps 說明
http://ftp.oss.tw/pub/Mirror/FreeBSD/freebsd.sinica.edu.tw/zh-tut/bg5ps.html3. bg5ps使用說明
bg5ps version:1.1b2
Copyright (C) 1998 Chen-Shan Chin
bg5ps comes with ABSOULETY NO WARRANTY, see GNU General Public License for detail.
Wrong option --help
bg5ps -fp fontpath -fn fontname
-o [1|0] -e [1|0]
-s size -ls linespacing -cs charspacing
-tm topMargin -bm bottomMargin -lm leftMargin -rm rightMargin
-if inputfile -of outputfile
-cf configFile
-en encoding
-nps y/n
Size, linespacing, charspacing, and margins are
numbers in unit of pt(1 pt=1/72 in).
encoding can be big5 or gb2312.
bg5ps -h: print this help
bg5ps -nps y: toggle netscape or mpage mode
Run as a filter:
cat big5text | bg5ps options > outputfile
Examples:
bg5ps -en big5 -fn ntu_kai -o 1 -e 0 -s 15 -ls 10 -cs 2 -tm 72 -bm 72 -if test -of test.ps
cat netscape.ps | bg5ps -en big5 -nps y -fn ntu_kai > test.ps
mpage -2 big5.txt | bg5ps -en big5 -nps y > test.ps