Japanese Printing mini HOWTO

偼偹傂偱傗

wing@flatout.org

wing@lain.org

Rel.0.0.1a 1996/08/22

偙偺僪僉儏儊儞僩偼丄Linux 忋偱擔杮岅傪報帤偡傞曽朄偵偮偄偰愢柧偟傑偡丅
塸岅斉偺 Printing HOWTO <http://www.linuxdoc.org/HOWTO/Printing-HOWTO/
index.html>(擔杮岅栿 <http://www.linux.or.jp/JF/JFdocs/
Printing-HOWTO.html>) 偲偼柍娭學偵婰弎偟偨傕偺偱偡丅

    Note: 偙偺暥彂偼偐側傝埲慜偵彂偐傟偨傕偺側偺偱丄偄傑偳偒偺 Linux 娐
    嫬偵偼偁偰偼傑傜側偄売強偑偁傝傑偡丅 (JF Project)
   
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

Table of Contents
1. 僾儕儞僞巊梡偺婎慴抦幆
   
    1.1. 僥僉僗僩僼傽僀儖偺庬椶
    1.2. 僾儕儞僞偺庬椶
   
2. lpr 僔僗僥儉
   
    2.1. lpr 僔僗僥儉偲偼
    2.2. lpr 僔僗僥儉偺巇慻傒
   
3. lpr 偵傛傞僥僉僗僩僼傽僀儖偺報帤曽朄
   
    3.1. /etc/printcap 偺愝掕
    3.2. 僗僾乕儖僨傿儗僋僩儕偺嶌惉
    3.3. 僨乕儌儞偺婲摦
    3.4. 報帤僥僗僩
   
4. PostScript 偺巊梡
   
    4.1. PostScript 偲偼
    4.2. GhostScript 偲偼
    4.3. GhostScipt 偺摦嶌
    4.4. GhostScript + lpr 偵傛傞報帤
   
5. 廔傢傝偵

1. 僾儕儞僞巊梡偺婎慴抦幆

傑偢巒傔偵丄僾儕儞僞傪埖偆忋偱丄抦偭偰偍偄偨曽偑椙偄偙偲傪傑偲傔傑偟偨
丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

1.1. 僥僉僗僩僼傽僀儖偺庬椶

僥僉僗僩僼傽僀儖偺庬椶偲尵偆偲戝偘偝偱偡偑丄僥僉僗僩僼傽僀儖偵偼丄捠徧
偱 SJIS, JIS, EUC 偺 3 庬椶偺娍帤僐乕僪偑偁傝傑偡丅

SJIS
   
    暿柤 MS 娍帤丄暿柤偺偲偍傝 DOS/Windows 摍偱庡偵巊梡偝傟傑偡丅
   
JIS
   
    Internet 忋偺儊乕儖傗僯儏乕僗偱庡偵巊梡偝傟傑偡丅
   
EUC
   
    UNIX 儅僔儞忋偱偺巊梡傪峫偊偰偮偔傜傟偨僐乕僪懱宯偱偡丅
   
偙傟偼慡偰屳姺惈偼偁傝傑偣傫偺偱丄偦傟偧傟偵偮偄偰張棟偡傞昁梫偑偁傝傑
偡丅JE 偱偼丄EUC 傪慜採偲偟偰偄傑偡丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

1.2. 僾儕儞僞偺庬椶

傛偔丄僥僉僗僩僼傽僀儖傪

   cat file > /dev/lp1                                                 

摍偲傗偭偰丄塸悢帤偼弌傞偑娍帤偑弌傑偣傫丄偲尵偭偨幙栤傪栚偵偟傑偡丅偙
傟偼丄僼傽僀儖忋偺娍帤僐乕僪傪僾儕儞僞偑棟夝偱偒側偄偨傔偵婲偙傝傑偡丅
椺偊偽丄EUC 偱僄儞僐乕僪偝傟偨僼傽僀儖偼丄嵟忋埵價僢僩偑棫偭偰偄傟偽娍
帤偲側傝傑偡偑(惓妋偵偼僠儑僢僠堘偄傑偡偺偱丄嫽枴偑偁傞曽偼挷傋偰尒偰壓
偝偄)丄偦傟傪僾儕儞僞偑棟夝偱偒側偄傢偗偱偡丅偦偙偱丄僾儕儞僞偑棟夝偱偒
傞傛偆偵僥僉僗僩僼傽僀儖傪曄姺偟側偗傟偽側傝傑偣傫丅曄姺偼丄僾儕儞僞惂
屼僐乕僪偺杽傔崬傒偲娍帤僐乕僪偺曄姺摍偺張棟傪峴側偄傑偡偑丄偙傟傜偼僾
儕儞僞偑丄偳偺惂屼僐乕僪傪僒億乕僩偟偰偄傞偐偵傛傝堎側傝傑偡丅師偵丄崙
撪偺庡梫側僾儕儞僞惂屼僐乕僪傪帵偟傑偡丅

ESC/P
   
    EPSON 偑奐敪偟偨僪僢僩僾儕儞僞梡偺惂屼僐乕僪懱宯
   
ESC/Page
   
    EPSON 偑奐敪偟偨儁乕僕僾儕儞僞梡偺惂屼僐乕僪懱宯 (ESC/P偲偼屳姺惈偼
    柍偄)
   
LIPS II, II+, III
   
    Canon 偺儁乕僕僾儕儞僞梡惂屼僐乕僪懱宯
   
PCPR201
   
    NEC PC 宆斣僾儕儞僞偺惂屼僐乕僪懱宯
   
NM
   
    NEC N 宆斣僾儕儞僞梡偺惂屼僐乕僪
   
幚嵺偺曄姺偼丄師偺復偱愢柧偡傞 lpr 偺僼傿儖僞偑峴側偭偰偔傟傑偡偐傜丄晛
抜偼堄幆偡傞昁梫偼偁傝傑偣傫偑丄強桳偺僾儕儞僞偑丄偳偺惂屼僐乕僪傪帩偭
偰偄傞偐偼 * 昁偢 * 攃埇偟偰偍偐偹偽側傝傑偣傫丅

    Important: 傑偨丄ESC/P 僗乕僷乕(ESC/PS)偲尵偆儌乕僪偑偁傞僾儕儞僞偑
    偁傝傑偡丅偙傟偼 ESC/P, ESC/Page(儁乕僕僾儕儞僞偺傒), PCPR201 傪帺
    摦揑偵嬫暿偡傞儌乕僪偲側偭偰偄傑偡丅偟偐偟丄幚嵺偵偼嬫暿偡傞偺偱側
    偔丄僜僼僩僂僃傾偐傜儌乕僪堏峴偺惂屼僐乕僪傪敪峴偟偰偄傞偺偱偡(婓偵
    帺摦揑偵嬫暿偡傞応崌傕偁傝傑偡偑)丅
   
    偱偡偐傜丄ESC/PS 偵懳墳偟偨僼傿儖僞傪巊梡偟側偄応崌偼丄僾儕儞僞偺儌
    乕僪傪庤摦偱愗傝懼偊傞昁梫偑偁傝傑偡丅
   
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

2. lpr 僔僗僥儉

lpr 偺奣梫偵偮偄偰愢柧偟傑偡丅lpr 偼 Linux 撈帺偺傕偺偱偼側偄偺偱丄
UNIX 堦斒偺彂愋傕嶲峫偵側傞偱偟傚偆丅傑偨丄僔僗僥儉偺愝掕偼 root (僗乕
僷乕儐乕僓) 偱峴偆偙偲傪朰傟側偄偱偔偩偝偄丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

2.1. lpr 僔僗僥儉偲偼

lpr 偼丄BSD 宯偺 UNIX 忋偱奐敪偝傟偨僾儕儞僩僕儑僽偺娗棟僔僗僥儉偱偡丅
偙傟傪巊偆偙偲偵傛傝丄暋悢偺儐乕僓偐傜丄報帤梫媮偺庴偗晅偗/僉儍儞僙儖/
弌椡忬嫷偺妋擣側偳偑弌棃傑偡丅

傕偟 lpr 傪巊傢側偐偭偨傜丄僨僶僀僗偺庢傝崌偄偵側傝暋悢偺僾儕儞僩僕儑僽
傪岠棪椙偔張棟偡傞偙偲偼弌棃側偄偱偟傚偆丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

2.2. lpr 僔僗僥儉偺巇慻傒

lpr 偼丄僨乕儌儞偺 lpd 偲丄lpd 偵梫媮傪弌偡僐儅儞僪孮偐傜峔惉偝傟偰偄傑
偡 (恾偑墭偄偺偼姩曎偟偰偹:-)丅

            僾儕儞僞(僗儁僔儍儖僼傽僀儖)                               
                         丱                                            
                         劆                                            
                      僼傿儖僞                                         
                         劆僉儏乕偐傜堦偮偯偮報帤                      
                         劆                                            
  僐儅儞僪孮 <劅劅劅劅> lpd 劅劅劅劅劅劅劅劅劅> spool                  
              弌椡梫媮      梫媮偺僉儏乕僀儞僌                         
              梫媮庢徚      報帤撪梕偺庢傝弌偟                         
              弌椡忬嫷      梫媮偺嶍彍                                 

幚嵺偵儐乕僓偑巊梡偡傞偺偼丄僐儅儞僪孮偩偗偱偡丅偟偐偟丄Linux 偱偼丄儐
乕僓 = 僔僗僥儉娗棟幰偺応崌偑懡偄偺偱丄lpd 摍偺愝掕傪峴側偆昁梫偑偁傝傑
偡丅偙偺懠偺摿挜偲偟偰丄僱僢僩儚乕僋忋偱偺巊梡傕峫偊傜傟偰偍傝丄懠偺儅
僔儞偺 lpd 偲楢実偟偰丄儕儌乕僩僾儕儞僞偵弌椡偡傞偙偲傕壜擻偱偡丅(杮僪
僉儏儊儞僩偱偼丄偙傟偵偼怗傟傑偣傫丅)

僾儕儞僞偺堘偄偼丄僼傿儖僞偑媧廂偡傞巇慻傒偵側偭偰偄傑偡丅師偺復偐傜偼
丄偙偺 lpr 傪巊梡偟偰偺報帤朄傪愢柧偟傑偡丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

3. lpr 偵傛傞僥僉僗僩僼傽僀儖偺報帤曽朄

lpr 傪巊偄丄僥僉僗僩僼傽僀儖傪報帤偨傔偺愝掕曽朄傪愢柧偟傑偡丅2 復偱愢
柧偟偨偲偍傝丄偙偙偱億僀儞僩偲側傞偺偼丄報帤偟傛偆偲偡傞僥僉僗僩僼傽僀
儖偺庬椶偲丄僾儕儞僞偺庬椶偱偡丅僾儕儞僞偼 BJ10VLite 傪憐掕偟偰偄傑偡偑
丄 ESC/P 偺惂屼僐乕僪傪帩偮傕偺側傜摨條偱偡丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

3.1. /etc/printcap 偺愝掕

巊梡偡傞僼傿儖僞丄僗僾乕儖摍偺掕媊傪丄/etc/printcap 僼傽僀儖偱峴側偄傑
偡丅printcap 偺婰弎椺傪帵偟傑偡丅婰弎偡傞偲偒丄婛偵 lp 偑偁偭偨応崌偵偼
丄嶍彍偡傞偐丄# 偱僐儊儞僩傾僂僩偟偰偍偄偰壓偝偄丅

   1     lp| ESC/P filter :\                                           
   2             :lp=/dev/lp1:\                                        
   3             :sh:\                                                 
   4             :if=/usr/lib/escpf:\                                  
   5             :of=/usr/lib/escpf:\                                  
   6             :sd=/var/spool/lpr/lp:\                               
   7             :pw#90:pl#66:\                                        
   8             :mx#0:\                                               
   9             :lf=/var/spool/lpr/lp/lpr-error:                      

偙傟傜偼師偺傛偆側堄枴偵側偭偰偄傑偡丅

 

 1. lp 偼 lpr 僔僗僥儉忋偺僾儕儞僞柤(僄儞僩儕)偱偡丅傑偨丄lp 偼丄僾儕儞
    僞柤傪巜掕偟側偐偭偨応崌偵僨僼僅儖僩偱巊梡偝傟傑偡丅| 埲崀偼僐儊儞
    僩偱偡丅
   
 2. 僗儁僔儍儖僼傽僀儖傪巜掕偟傑偡丅僾儕儞僞億乕僩偺 I/O 傾僪儗僗偵傛偭
    偰丄 0x3bc:/dev/lp0, 0x378:/dev/lp1, 0x278:/dev/lp2 偲側傝傑偡丅
   
 3. 僇僶乕僔乕僩(弌椡偟偨儂僗僩柤傗儐乕僓柤偑報帤偝傟傞)偺弌椡傪梷惂偟
    傑偡丅
   
 4. Input Filter 偱偡丅暥帤捠傝擖椡僨乕僞偺僼傿儖僞偱偡丅椺偊偽壽嬥忣曬
    摍傪張棟偡傞応崌偵巊梡偝傟傑偡丅偙偙偱偼 JE 偵娷傑傟傞 ESC/P 梡偺僼
    傿儖僞傪巜掕偟偰偄傑偡偑丄摿暿壗傕偟偰偄傑偣傫丅
   
 5. Output Filter 偱偡丅弌椡僨乕僞偺僼傿儖僞偱偡丅偙偙偱 1.2 愡偱愢柧偟
    偨曄姺側偳傪偍偙側偄傑偡丅JE 偵娷傑傟傞 ESC/P 梡偺僼傿儖僞傪巜掕偟
    偰偄傑偡偑丄摿暿壗傕偟偰偄傑偣傫丅
   
 6. 僗僾乕儖僨傿儗僋僩儕傪巜掕偟傑偡丅偙傟偼 1 偺僾儕儞僞柤枅偵嶌惉偟傑
    偡丅
   
 7. pw 偑報帤寘悢丄pl 偑報帤峴悢偺巜掕偱偡丅偙偺巜掕偼丄escpf 僼傿儖僞
    偵偍偗傞 A4 偱偓傝偓傝偺僒僀僘偱偡丅
   
 8. 僗僾乕儖偡傞嵟戝僼傽僀儖僒僀僘偺巜掕偱偡丅0 傪巜掕偡傞偲柍惂尷偵側
    傝傑偡丅
   
 9. 儘僌僼傽僀儖偺巜掕偱偡丅僄儔乕敪惗帪偵婰榐偡傞僼傽僀儖偱偡丅
   
彂幃偺徻嵶偼丄man printcap 偱昞帵偝傟傑偡丅

巊梡偟偨僼傿儖僞丄escpf 偼丄EUC 偲 JIS 僐乕僪偺僼傽僀儖傪丄ESC/P 偺惂屼
僐乕僪偵曄姺偟傑偡丅

escpf 偼 PCPR201 傪張棟偱偒側偄偺偱丄摨偠偔 JE 偵娷傑傟傞 pf 僐儅儞僪傪
棙梡偟偰丄師偺傛偆側僔僃儖僗僋儕僾僩傪僼傿儖僞偵偡傞偲椙偄偱偟傚偆丅

   #!/bin/sh                                                           
   /usr/bin/pf -DPCPR -IEUC                                            
   exit 0                                                              

* 嵟嬤偺 NEC 僾儕儞僞偼丄ESC/P 傪僒億乕僩偡傞傕偺傕敪攧偝傟偰偍傝丄
PCPR201 傪巊偆婡夛偼尭偭偰偒偰偄傞偱偟傚偆丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

3.2. 僗僾乕儖僨傿儗僋僩儕偺嶌惉

僗僾乕儖僨傿儗僋僩儕傪嶌惉偟傑偡丅扨弮偵 mkdir 偱嶌惉偡傞偩偗偱偡丅

   # mkdir /var/spool/lpr                                              
   # mkdir /var/spool/lpr/lp                                           

    拲堄: 埲慜偼丄嶌惉屻 chown root.lp 偲 chmod 775 摍偲偟偰偄偨偺偱偡
    偑丄Slackware-3.0 偱偼摿偵昁梫側偄傛偆偱偡丅
   
       # chown root.lp /var/spool/lpr/lp                               
       # chmod 775 /var/spool/lpr/lp                                   
   
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

3.3. 僨乕儌儞偺婲摦

Slackware 偱偼丄僨僼僅儖僩偱 lpd 偑婲摦偡傞傛偆偵側偭偰偄傞偺偱丄摿偵嶌
嬈偡傞昁梫偼偁傝傑偣傫丅ps 僐儅儞僪偱妋擣偟丄傕偟 lpd 偑婲摦偟偰偄側偄
傛偆偱偁傟偽丄/etc/rc.d/rc.inet2 偺 $IN_SERV 傪妋擣偟偰壓偝偄丅 IN_SERV
="lpd" 偲側偭偰偄傟偽戝忎晇偺敜偱偡丅

lpd 偑婲摦偟偰偄傞偙偲傪妋擣偟偨傜丄lpc 僐儅儞僪偱師偺傛偆偵偟傑偡丅

   # lpc                                                               
   lpc> restart all                                                    
   lp:                                                                 
           no daemon to abort                                          
   lp:                                                                 
           daemon started                                              
   lpc> quit                                                           
   #                                                                   

偙偺偲偒丄儘僢僋僼傽僀儖偑僆乕僾儞偱偒側偄偲尵偆儊僢僙乕僕偑弌傞偐傕抦
傟傑偣傫偑丄柍帇偟偰峔偄傑偣傫丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

3.4. 報帤僥僗僩

偦傟偱偼丄弨旛偑弌棃偨偺偱憗懍報帤偟偰傒傑偟傚偆丅報帤偵偼丄師偺僐儅儞
僪孮傪巊梡偟傑偡丅

lpr 報帤梫媮
   
    報帤梫媮傪 lpr 僔僗僥儉偵敪峴偟傑偡丅
   
       lpr 僾儕儞僞柤 報帤僼傽僀儖                              
   
    椺
   
       # lpr EUC_file                                           
   
    慜弎偺偲偍傝丄僾儕儞僞柤偼 lp 偱偡偐傜徣棯偱偒傑偡丅傛偭偰丄忋婰偺
    傛偆偵側傝傑偡丅
   
    傕偟傕報帤偝傟側偄応崌丄師偺偙偲傪妋擣偟傑偡丅
   
     
   
     仩 printcap 偺婰弎(僼傿儖僞傗僗僾乕儖僨傿儗僋僩儕偼偪傖傫偲懚嵼偡
        傞偐?)
       
     仩 lpd 偑婲摦偟偰偄傞偐? (ps 僐儅儞僪偱妋擣)
       
     仩 報帤偟傛偆偲偟偨僼傽僀儖偼 EUC 偐 JIS 偺偳偪傜偐偐?
       
     仩 ESC/P 僗乕僷乕婡擻偮偒僾儕儞僞偺応崌丄偪傖傫偲夝彍偝傟偰偄傞偐?
       
     
   
lpq 報帤懸偪偺昞帵
   
    尰嵼僉儏乕僀儞僌偝傟偰偄傞報帤僕儑僽傪昞帵偟傑偡丅
   
       lpq 僾儕儞僞柤                                           
   
    椺
   
       # lpq -Plp                                                              
       lp is ready and printing                                                
       Rank   Owner      Job  Files                                 Total Size 
       active wing       1    JPrinting-mini-HOWTO.jis              7470 bytes 
       1st    wing       2    JPrinting-mini-HOWTO.jis              7470 bytes 
       2nd    wing       3    JPrinting-mini-HOWTO.jis              7470 bytes 
       #                                                                       
   
lprm 報帤梫媮偺庢徚
   
    報帤梫媮傪庢傝徚偟傑偡丅傕偪傠傫庢傝徚偣傞偺偼丄帺暘偺僕儑僽偩偗偱
    偡丅
   
       lprm 僾儕儞僞柤 僕儑僽斣崋                               
   
    椺
   
       # lprm -Plp 1                                            
       dfA001Aa00918 dequeued                                   
       cfA001Aa00918 dequeued                                   
       #                                                        
   
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

4. PostScript 偺巊梡

4.1. PostScript 偲偼

PostScript 偲偼丄傾僪價偑奐敪偟偨儁乕僕婰弎尵岅偱偡丅堦斒偺惂屼僐乕僪偑
(巻柺忋)僔乕働儞僔儍儖偵惂屼僐乕僪傪張棟偟偰偄偔偺偵懳偟偰丄巻柺忋偺偳
偙偵壗傪抲偔偲尵偆傛偆偵張棟偟傑偡丅抲偔傕偺偼丄暥帤偵尷傜偢丄恾宍傗價
僢僩儅僢僾傕壜擻偱偡丅

徻偟偔抦傝偨偄曽偼丄岺妛彂偺僐乕僫乕偵揹榖挔媺偺杮偑2嶜抲偄偰偁傞偺偱偡
偖偵傢偐傞偱偟傚偆丅捠忢偼丄PostScript 僾儕儞僞偵懳偟偰巊梡偟傑偡丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

4.2. GhostScript 偲偼

GhostScript 偲偼丄man 儁乕僕偐傜尵梩傪庁傝傟偽 PostScript 偺僄儈儏儗乕
僞偱偡丅PostScript 偲偰丄寢嬊偼價僢僩僀儊乕僕偵揥奐偟偰偄傞偩偗偱偡偐傜
丄價僢僩僀儊乕僕偑報帤偱偒傞僾儕儞僞(晛捠弌棃側偄僾儕儞僞偼柍偄偱偟傚
偆)側傜僄儈儏儗乕僩偑壜擻側傢偗偱偡丅椺偊偽 ESC/P 傪 PCPR201 偵僄儈儏儗
乕僩偡傞偙偲傕栜榑壜擻偱偡偑丄偦傟傪傗傜側偄偺偼儊儕僢僩偑柍偄偐傜偱偡
丅媡偵尵偆偲丄傢偞傢偞僄儈儏儗乕僩傪偡傞偲尵偆偺偼丄偦傟偩偗壙抣偑偁傞
偲偄偆偙偲偱偡丅

偦偺壙抣偲偼丄TeX 摍偺報帤傗壙奿柺摍偩偲巚偄傑偡丅TeX 偱偼 dvi 宍幃偺僼
傽僀儖偐傜報帤偡傞偙偲傕壜擻偱偡偑丄EPS 摍傪庢傝崬傫偱偄傞応崌偵偼丄傗
偼傝 PostScript 偱報帤偡傞傎偆偑曋棙偱偡丅壙奿柺偱傕丄PostScript 僾儕儞
僞傪攦偆偺偵斾傋丄偼傞偐偵埨偄壙奿偱娐嫬傪峔抸偱偒傑偡丅摿偵 Color
PostScript 偼旕忢偵崅壙偱偡偑丄Canon 傗 EPSON 摍偺僀儞僋僕僃僢僩偲慻傒
崌傢偣傞偙偲偵傛傝丄旕忢偵埨壙偵 Color PostScript 傪幚尰偱偒傑偡丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

4.3. GhostScipt 偺摦嶌

GhostScript 偺摦嶌偼扨弮偱偡丅

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆                      PostScript                                    劆
劆                          伀                                        劆
劆                 GhostScript 偵偰張棟                               劆
劆                          伀                                        劆
劆    奺庬僾儕儞僞惂屼僐乕僪/夋憸僼僅乕儅僢僩偵曄姺                   劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

偙傟偩偗側偺偱偡丅柺搢側偺偼丄奺庬僾儕儞僞惂屼僐乕僪/夋憸僼僅乕儅僢僩偵
曄姺偵曄姺偡傞帪偺愝掕/巜掕偱偡(愝掕/巜掕偼師偺愡偱傗傝傑偡)丅
JE-0.9.7z 偵廂榐偝傟偨 GhostScript 偺丄庡側弌椡僨僶僀僗傪師偵帵偟傑偡丅

偙傟傜偼丄gs -h 偱妋擣偱偒傑偡丅

 

惷揑偵慻傒崬傑傟偨傕偺
   
    劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
    劆   x11         S X Window System                                      劆
    劆   dmprt       P dviprt 梡偺僐儞僼傿僌儗乕僔儑儞僼傽僀儖傪棙梡偟偨報帤劆
    劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
   
摦揑偵慻傒崬傑傟偨傕偺
   
    劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
    劆   bj10v       P Canon BJ10宯                                     劆
    劆   bjc600j     P Canon BJC600 梡僇儔乕懳墳(610 偺 720dpi 偼晄柧)  劆
    劆   dj505j      P HP Desk Jet 505                                  劆
    劆   epag        P EPSON ESC/Page                                   劆
    劆   linux       S linux console                                    劆
    劆   lips        P Canon LIPS                                       劆
    劆   lips2       P Canon LIPS II                                    劆
    劆   lips3       P Canon LIPS III                                   劆
    劆   mjc180      P EPSON MJ800C/700V2C/900C/5000C 摍偺僇儔乕 180dpi 劆
    劆   mjc360      P EPSON MJ800C/700V2C/900C/5000C 摍偺僇儔乕 360dpi 劆
    劆   mjc720      P EPSON MJ800C/700V2C/900C/5000C 摍偺僇儔乕 720dpi 劆
    劆   pr150       P PC-PR150                                         劆
    劆   tiffg3      S TIFF G3 FAX                                      劆
    劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
   
dmprt 偑巊梡偱偒傞偺偱丄傎偲傫偳偺僾儕儞僞偼巊梡偱偒傞偲巚偄傑偡丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

4.4. GhostScript + lpr 偵傛傞報帤

GhostScript 偼丄僾儕儞僞偑懄棟夝偱偒傞僐乕僪傪惗惉偟傑偡偐傜丄捈愙僗儁
僔儍儖僼傽僀儖偵擖椡偟偰傕報帤偼弌棃傑偡丅偟偐偟丄偙傟偱偼僗僾乕儕儞僌
傕偱偒傑偣傫偟岠棪椙偔巊梡偱偒側偄偲巚偄傑偡丅偱偡偐傜丄GhostScript 傪
lpr 偺僼傿儖僞偲偟偰巊梡偟傑偡丅

偙偙偱偼丄True Type 僼僅儞僩傪梡偄偰丄BJ10VLite + dmprt 偲 LP1700 +
epag 偱報帤偡傞椺傪徯夘偟傑偡丅側偍丄GhostScript 偼 JE-0.9.7z 偵廂榐偝
傟偨傕偺傪巊梡偟傑偡丅

嫟捠愝掕(偦偺堦) 仺 BJ10 or LP1700偺愝掕仺嫟捠愝掕(偦偺擇) 偺弴偱嶌嬈偟
傑偡丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

4.4.1. 嫟捠愝掕(偦偺堦)

傑偢嫟捠愝掕偲偟偰丄GhostScript 偑巊梡偡傞擔杮岅僼僅儞僩偺愝掕傪峴側偄
傑偡丅

 

kconfig.ps 偺愝掕
   
    GhostScript 偼 kconfig.ps 偵傛傝丄偳偺擔杮岅僼僅儞僩傪巊梡偡傞偐寛
    掕偟傑偡丅kconfig.ps 偼丄/usr/local/lib/ghostscript/kanji 埲壓偵嶌
    惉偡傞僔儞儃儕僢僋儕儞僋偱偡(傕偪傠傫僐僺乕偟偰傕峔偄傑偣傫偑丄偦傟
    偼偩偝偄偱偡傛偹:-)丅/usr/local/lib/ghostscript/kanji 埲壓偵偼丄
    zeit.ps 傗 vflib.ps 摍偺僼傽僀儖偑偁傝丄巊梡偡傞傕偺偵儕儞僋傪挘傝
    傑偡丅
   
    偙偙偱偼丄vflib.ps 傪巊梡偟傑偡丅vflib.ps 偲偼丄峀搰戝妛偺妏愳偝傫
    偑嶌惉偝傟偨丄儀僋僩儖僼僅儞僩傪價僢僩儅僢僾僨乕僞偵曄姺偡傞儔僀僽
    儔儕 VFlib 傪巊梡偡傞傕偺偱偡丅
   
    傛偭偰丄師偺傛偆偵僔儞儃儕僢僋儕儞僋傪挘傝傑偡丅
   
       # cd /usr/local/lib/ghostscript/kanji                    
       # ln -s vflib.ps kconfig.ps                              
   
vfontcap 偺愝掕
   
    VFlib 傪巊梡偡傞偙偲傪愝掕偟偨偺偱丄偙傫偳偼 VFlib 偑巊梡偡傞僼僅儞
    僩偺愝掕傪偟傑偡丅偮傑傝丄
   
    劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
    劆    GhostScript 仺 VFlib 仺 奺庬儀僋僩儖僼僅儞僩        劆
    劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
   
    偺傛偆偵側偭偰偄偰丄GhostScript 偑傒偰偄傞偺偼 VFlib 偩偗側偺偱偡丅
   
    偝偰丄VFlib 偑巊梡偡傞僼僅儞僩偼丄/etc/vfontcap 僼傽僀儖偱愝掕偟傑
    偡丅vfontcap 偺 70 峴栚晅嬤偺 ff 傪師偺傛偆偵廋惓偟傑偡丅偙偺椺偱偼
    丄僼僅儞僩偑 /home/sys/fonts2/ 埲壓偵偁傞応崌偱偡偐傜丄奺帺偺娐嫬偵
    偁傢偣偰僷僗傪愝掕偟偰壓偝偄丅
   
     
   
       ### TRUETYPE FONT (Windows fonts)                        
       r-microsoft-mincho|MicroSoft mincho:\                    
               :ft=truetype:\                                   
               :ff=/home/sys/fonts2/msmincho:  仼 偙偙偲        
       r-microsoft-gothic|Microsoft gothic:\                    
               :ft=truetype:\                                   
               :ff=/home/sys/fonts2/msgothic:  仼 偙偙偹        
   
    偝傜偵丄TrueType 僼僅儞僩偺応崌偵偼僀儞僨僢僋僗僼傽僀儖偑昁梫偵側傝
    傑偡丅僼僅儞僩偑懚嵼偡傞僷僗(椺偱偼 /home/sys/fonts2/ )偵堏摦偟偨傜
    丄
   
       # ttindex msmincho.ttc                                   
       # ttindex msgothic.ttc                                   
   
    傪幚峴偟偰僀儞僨僢僋僗僼傽僀儖傪嶌惉偟傑偡丅僼僅儞僩偑 Windows3.1
    偺応崌偵偼丄奼挘巕偑 ttc 偱偼側偔丄ttf 偵側傝傑偡丅
   
    師偵丄160 峴栚晅嬤偺師偺晹暘傪僐儊儞僩傾僂僩偟傑偡丅
   
       # zeit-maru                                                                     
       min|min5|min6|min7|min8|min9|min10|min12|min17|Mincho Font:\                    
               :fc=zeit-mincho:                                                        
       goth|goth5||goth6|goth7|goth8|goth9|goth10|goth12|goth17|Gothic Font:\          
               :fc=zeit-gothicMH:                                                      
       tmin|tmin5|tmin6|tmin7|tmin8|tmin9|tmin10|tmin12|tmin17|Mincho Font:\           
               :fc=zeit-mincho:                                                        
       tgoth|tgoth5||tgoth6|tgoth7|tgoth8|tgoth9|tgoth10|tgoth12|tgoth17|Gothic Font:\ 
               :fc=zeit-gothicMH:                                                      
       bmin:\                                                                          
               :fc=zeit-mincho:                                                        
       bgoth:\                                                                         
               :fc=zeit-gothicMH:                                                      
   
    偙傫偳偼丄209 峴栚晅嬤偺 # TrueType 偐傜 *師偺峴埲崀* 偺僐儊儞僩傪
    奜偟傑偡丅
   
       # TrueType                                                                       
       #min|min5|min6|min7|min8|min9|min10|min12|min17|Mincho Font:\                    
       #       :fc=microsoft-mincho:                                                    
       #goth|goth5||goth6|goth7|goth8|goth9|goth10|goth12|goth17|Gothic Font:\          
       #       :fc=microsoft-gothic:                                                    
       #tmin|tmin5|tmin6|tmin7|tmin8|tmin9|tmin10|tmin12|tmin17|Mincho Font:\           
       #       :fc=microsoft-mincho:                                                    
       #tgoth|tgoth5||tgoth6|tgoth7|tgoth8|tgoth9|tgoth10|tgoth12|tgoth17|Gothic Font:\ 
       #       :fc=microsoft-gothic:                                                    
       #bmin:\                                                                          
       #       :fc=microsoft-mincho:                                                    
       #bgoth:\                                                                         
       #       :fc=microsoft-gothic:                                                    
   
    埲忋偱嫟捠愝掕(偦偺堦)偼姰椆偱偡丅偙偙偱僥僗僩傪偟偰傒傑偟傚偆丅
   
    /usr/local/lib/ghostscript 埲壓偵堏摦偟偰丄師偺僐儅儞僪傪幚峴偟偰傒
    偰壓偝偄丅
   
     
   
    X Window System 偺応崌
       
           gs article9.ps                                       
       
    Linux 偺僐儞僜乕儖偺応崌
       
           gslx article9.ps                                     
       
     
   
    夋柺忋偵擔杮崙寷朄偑昞帵偝傟傟偽OK偱偡丅傕偟偆傑偔峴偐側偄応崌丄
    which gs 偲偟偰丄偳偙偺 gs 傪幚峴偟偰偄傞偐僠僃僢僋偟偰壓偝偄丅JE
    偺 gs 偼丄 /usr/local/bin/gs(gslx) 偱偡丅
   
Canon BJ10VLite + dmprt driver
   
    dmprt 偼 dviprt 偺愝掕僼傽僀儖傪棙梡偡傞僪儔僀僶偱偡丅偙偺愝掕僼傽
    僀儖偼丄 /usr/local/lib/prtcfg/ 埲壓偵偁傝傑偡丅 cfg 偲 src 偺僒僽
    僨傿儗僋僩儕偑偁傝傑偡偑丄慜幰偼屻幰傪僶僀僫儕曄姺偟偨傕偺偱偡丅昅
    幰偼曄姺偑柺搢側偺偱丄src (僜乕僗)傪棙梡偟偰偄傑偡丅偙偺僼傽僀儖傪
    棙梡偡傞偙偲偼丄 /usr/local/lib/ghostscript/dmp_site.ps 偱愝掕偟傑
    偡丅
   
    dmp_site.ps 偵偼丄
   
       /printer (/usr/local/lib/prtcfg/src/bj_10v48.src)        
   
    偲偩偗彂偄偰偍偗偽丄堦墳摦偒傑偡丅偟偐偟丄偙傟偩偗偱偼戝掞報帤偑偢
    傟傞偺偱丄僆僼僙僢僩傗儅乕僕儞傕掕媊偟傑偡丅
   
       /margin  [ 3.675 mm 12.7 mm 0.0 mm 0.0 mm ]              
       /offset  [ 0.0 mm -4.0 mm ]                              
   
    偱偡偐傜丄3 峴傕偁傟偽廫暘偱偟傚偆丅
   
    dmp_site.ps 偑廋惓偱偒偨傜丄僼傿儖僞傪嶌惉偟傑偡丅僼傿儖僞偼 /usr/
    local/lib/gsf 偵丄師偺傛偆偵嶌惉偡傞偲椙偄偱偟傚偆丅嶌惉屻 chmod
    755 偲偡傞偺傪朰傟側偄偱壓偝偄丅
   
       #!/bin/sh                                                
       /usr/local/bin/gs -q -dNOPAUSE -sDEVICE=dmprt -r360 \    
       -sPAPERSIZE=a4 -sOutputFile=- -                          
       exit 0                                                   
   
    2 峴栚偺 -r360 偼丄夝憸搙(dpi)偱偡偐傜丄僾儕儞僞偵偁傢偣偰寛掕偟傑
    偡丅
   
EPSON LP1700 + epag driver
   
    偙偺慻崌偣偱偼丄GhostScript 慻傒崬傑傟偨僪儔僀僶偑偦偺傑傑巊梡偱偒
    傑偡偐傜丄師偺傛偆偵 /usr/local/lib/gsf 偱僼傿儖僞傪嶌惉偟丄 chmod
    755 偲偟偰偍偒傑偡丅
   
       #!/bin/sh                                                
       /usr/local/bin/gs -q -dNOPAUSE -sDEVICE=epag -r300 \     
       -sPAPERSIZE=a4 -sOutputFile=- -                          
       exit 0                                                   
   
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

4.4.2. 嫟捠愝掕(偦偺擇)

巆傞偼 lpr 偺愝掕偱偡丅3.1 復, 3.2 復偱愢柧偟偨偲偍傝丄printcap 偲僗僾
乕儖僨傿儗僋僩儕傪嶌惉偟傑偡丅

 

printcap 偺愝掕
   
    /etc/printcap 偵丄師偺儕僗僩傪捛壛偟傑偡丅婰弎偡傞偲偒丄婛偵 ps 偺
    僾儕儞僞柤(僄儞僩儕)偑柍偄偙偲傕妋擣偟偰壓偝偄丅
   
       1     ps|gs|GhostScript printer:\                        
       2             :lp=/dev/lp1:sh:mx#0:\                     
       3             :if=/usr/local/lib/gsf:\                   
       4             :sd=/var/spool/lpr/ps:\                    
       5             :lf=/var/spool/lpr/ps/lpr-error:           
   
僗僾乕儖僨傿儗僋僩儕偺嶌惉
   
    僗僾乕儖僨傿儗僋僩儕傪嶌惉偟傑偡丅
   
       # mkdir /var/spool/lpr                                   
       # mkdir /var/spool/lpr/ps                                
   
    嶌惉偟偨傜丄3.3 復偲摨條偵 lpc 傪幚峴偟偰壓偝偄丅
   
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

4.4.3. 僥僗僩報帤

慡偰偺愝掕偑廔偭偨偺偱丄僥僗僩報帤傪偟傑偡丅偝偒傎偳偲摨條偵 /usr/local
/lib/ghostscript 埲壓偵堏摦偟偰丄師偺僐儅儞僪傪幚峴偟偰傒偰壓偝偄丅

   # lpr -Pps article9.ps                                              

偙傟偱丄嫟捠愝掕(偦偺堦)偺夋柺偲摨條偵丄擔杮崙寷朄偑僾儕儞僞偐傜弌椡偝
傟傑偡丅

偆傑偔報帤偝傟側偄応崌丄gs -h 傪婲摦偟偰丄僪儔僀僶乕偑僒億乕僩偝傟偰偄
傞偐妋擣偟偰壓偝偄丅JE-0.9.7z 偺 GhostScript 偱偼丄師偺傛偆偵側傝傑偡丅

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆   Ghostscript version 2.6.2 (4/19/95)                                        劆
劆   Copyright (C) 1990-1995 Aladdin Enterprises, Menlo Park, CA.               劆
劆   Usage: gs [switches] [file1.ps file2.ps ...]                               劆
劆   Available devices:                                                         劆
劆       x11 dmprt                                                              劆
劆   Dynamic modules:                                                           劆
劆       bit       bj10v     bj10vh    bjc600j   bjc600jc  bmp16     bmp16m     劆
劆       bmp256    bmpmono   cdj560    dj505j    dj505jc   epag      escp       劆
劆       escpc     jj100     linux     lips      lips2     lips3     mag16      劆
劆       mag256    mjc180    mjc360    mjc720    pbm       pbmraw    pcx16      劆
劆       pcx256    pcxgray   pcxmono   pgm       pgmraw    ppm       ppmraw     劆
劆       pr150     tiffg3    x11       dfaxhigh  dfaxlow   埲壓徣棯             劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

5. 廔傢傝偵

杮僪僉儏儊儞僩偺僶僌儗億乕僩/墳梡帠椺偼娊寎偟傑偡丅偆傑偔偄偐側偄偲偒偼
丄巊梡偟偨娐嫬偲愝掕傪柧妋偵偟偰丄fj.os.linux 摍偱幙栤偡傞偲椙偄偱偟傚
偆丅捈愙幙栤偡傞偙偲偼屼墦椂偔偩偝偄丅

(SGML conversion: Mar 2001, Yuji Senda)

