トップ > 日医標準レセプトソフト > 運用のための各種設定 > 検証済みプリンタ > ブラザー > ブラザー工業製 プリンタ(HL-6050DN)woody設定手順書書

ブラザー工業製 プリンタ(HL-6050DN)設定手順書

作成:ORCAサポートセンタ


本編では日医標準レセプトソフト(以下、日レセと表記)をインストールしたマシンから、各種帳票をブラザー工業株式会社(以下ブラザー社)レーザプリンタにて出力する手順を説明します。
なお、以下の記述はHL-6050DNを基準に行っておりますが、これをHL-5070DNと読み替えても同様です。

1. プリンタの設定

プリンタをネットワーク接続にて使用する場合は、あらかじめプリンタ付属のCDより設定ツール(BRAdmin Professional)をインストールしたWindowsPCを使ってIPアドレス、サブネットマスク、ゲートウェイを設定して下さい。

2. 日レセの動作確認

さざなみフォントをインストールして、レセプトプレビューが正常に表示されることを確認して下さい。表示がおかしい場合は、この段階で障害を取り除いて下さい。

3. Debianの設定(以下、使用するプリンタをHL-6050DNとして説明します)

ブラザー社のWEBサイト(http://solutions.brother.co.jp/linux/index.html)からLPR用ドライバー(hl6050dlpr-1.1.2-1.i386.deb)をダウンロードして、WEBサイトの手順に従ってインストールします。

/etc/printcapファイルにHL6050Dという名前でプリンタエントリーが作成されます。これを元に設定ごとにlp1、lp2…、と複数の設定を作成します。

4. HL-6050DN用設定ファイルの編集

用紙サイズ等の変更はブラザー社のHPを参考にbrprintconfコマンドにて行います。

Brprintconfを実行すると、/usr/local/Brother/infディレクトリにある
brHL6050Drcファイルの内容が変更されますので、変更後のファイルを別名で保存します。

例:用紙サイズをA5に変更
kterm等から

# brprintconf -P HL6050D -pt A5

を実行します。brHL6050Drcをvi等で開くとPaperType=A5に変更されているのがわかります。
このファイルをbrHL6050DrcA5と別名でコピーします。

# cp brHL6050Drc brHL6050DrcA5

次に、フィルタの記述を変更し、別名でコピーしたファイルを参照するよう設定します。

/usr/local/Brother/lpdディレクトリにあるfilterHL6050Dを別名でコピーして編集します。

# cp filterHL6050D filterHL6050D_A5

コピーしたfilterHL6050D_A5をvi等で開くと
RCFILE=`eval echo $BR_PRT_PATH/inf/brPRINTERrc | …
という記述が2カ所あります。これを
RCFILE=`eval echo $BR_PRT_PATH/inf/brPRINTERrcA5 | …
と変更し、保存します。

最後に/etc/printcapファイルでA5用として作成したエントリで使用するフィルタとして、
編集したフィルタ名を指定し、lprngを再起動(# /etc/init.d/lprng restart)して下さい。

4. 設定ファイル例

A4用紙を手差しトレイとカセットから打ち分ける。

lp1=カセット、lp2=手差し給紙、プリンタのIPアドレス=192.168.0.100とします。

*/etc/printcapファイル(¥はバックスラッシュ)

# /etc/printcap: printer capability database. See printcap(5).
# You can use the filter entries df, tf, cf, gf etc. for
# your own filters. See the printcap(5) manual page for further 
# details.

lp1|A4-Casset1:¥
        :mx=0:¥
:lpd_bounce:¥
        :longnumber:¥
        :sd=/var/spool/lpd/HL6050D-A4C1:¥
        :sh:¥
        :lp=:¥
        :rm=192.168.0.100:¥
        :if=/usr/local/Brother/lpd/filterHL6050D_A4C1:

lp2|A4-Manual:¥
        :mx=0:¥
        :lpd_bounce:¥
        :longnumber:¥
        :sd=/var/spool/lpd/HL6050D-A4MP:¥
        :sh:¥
        :lp=:¥
        :rm=192.168.0.100:¥
        :if=/usr/local/Brother/lpd/filterHL6050D_A4MP:

*lp1のフィルタとして指定したfilterHL6050D_A4C1ファイル

#! /bin/sh
#
# Brother Print filter
# Copyright (C) 2003 Brother. Industries, Ltd.
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA  02111-1307  USA
#

PRINTER="HL-6050D"
PRINTER_TMP=$(echo $PRINTER | sed -e 's/ //g' -e 's/-//g')

BR_PRT_PATH=/usr/local/Brother/
RCFILE=`eval echo $BR_PRT_PATH/inf/brPRINTERrcA4C1 | eval sed 's/PRINTER/"$PRINTER_TMP"/'`
PAPER_INF=$BR_PRT_PATH/inf/paperinf
PSCONV=$BR_PRT_PATH/lpd/psconvert
BRCONV=$BR_PRT_PATH/lpd/rawtobr
RCFILE=`eval echo $BR_PRT_PATH/inf/brPRINTERrcA4C1 | eval sed 's/PRINTER/"$PRINTER_TMP"/'`

INPUT_TEMP=`mktemp /tmp/br_input.XXXXXX`
cat > $INPUT_TEMP

FILE_TYPE=`file $INPUT_TEMP | sed -e 's/^.*:[ ]*//' -e 's/[ ].*//'`

#if [ "$FILE_TYPE" = "PostScript" -o "$FILE_TYPE" = "PDF" ] ; then
	PSCONV_OP="$PAPER_INF $RCFILE"
	BRCONV_OP="-pi $PAPER_INF -rc $RCFILE"
#fi

trap '' 2
case "$FILE_TYPE" in      
	"PostScript")
		eval cat $INPUT_TEMP | $PSCONV $PSCONV_OP | $BRCONV $BRCONV_OP
		RET=$?
		;;
	"PDF")
		PS_TEMP=`mktemp /tmp/br_ps.XXXXXX`
		pdf2ps $INPUT_TEMP $PS_TEMP
		eval cat $PS_TEMP | $PSCONV $PSCONV_OP | $BRCONV $BRCONV_OP
		RET=$?
		rm -f $PS_TEMP
		;;
	* )
		A2PS_OP="--output=- -q -1 --no-header --borders no"
		eval cat $INPUT_TEMP | a2ps $A2PS_OP | $PSCONV $PSCONV_OP | $BRCONV $BRCONV_OP
		RET=$?
		;;
esac
trap 2

rm -f $INPUT_TEMP

exit $RET

*lp2のフィルタとして指定したfilterHL6050D_A4MPファイル

#! /bin/sh
#
# Brother Print filter
# Copyright (C) 2003 Brother. Industries, Ltd.
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA  02111-1307  USA
#

PRINTER="HL-6050D"
PRINTER_TMP=$(echo $PRINTER | sed -e 's/ //g' -e 's/-//g')

BR_PRT_PATH=/usr/local/Brother/
RCFILE=`eval echo $BR_PRT_PATH/inf/brPRINTERrcA4MP | eval sed 's/PRINTER/"$PRINTER_TMP"/'`
PAPER_INF=$BR_PRT_PATH/inf/paperinf
PSCONV=$BR_PRT_PATH/lpd/psconvert
BRCONV=$BR_PRT_PATH/lpd/rawtobr
RCFILE=`eval echo $BR_PRT_PATH/inf/brPRINTERrcA4MP | eval sed 's/PRINTER/"$PRINTER_TMP"/'`

INPUT_TEMP=`mktemp /tmp/br_input.XXXXXX`
cat > $INPUT_TEMP

FILE_TYPE=`file $INPUT_TEMP | sed -e 's/^.*:[ ]*//' -e 's/[ ].*//'`

#if [ "$FILE_TYPE" = "PostScript" -o "$FILE_TYPE" = "PDF" ] ; then
	PSCONV_OP="$PAPER_INF $RCFILE"
	BRCONV_OP="-pi $PAPER_INF -rc $RCFILE"
#fi

trap '' 2
case "$FILE_TYPE" in      
	"PostScript")
		eval cat $INPUT_TEMP | $PSCONV $PSCONV_OP | $BRCONV $BRCONV_OP
		RET=$?
		;;
	"PDF")
		PS_TEMP=`mktemp /tmp/br_ps.XXXXXX`
		pdf2ps $INPUT_TEMP $PS_TEMP
		eval cat $PS_TEMP | $PSCONV $PSCONV_OP | $BRCONV $BRCONV_OP
		RET=$?
		rm -f $PS_TEMP
		;;
	* )
		A2PS_OP="--output=- -q -1 --no-header --borders no"
		eval cat $INPUT_TEMP | a2ps $A2PS_OP | $PSCONV $PSCONV_OP | $BRCONV $BRCONV_OP
		RET=$?
		;;
esac
trap 2

rm -f $INPUT_TEMP

exit $RET

*brprintconfコマンドにてA4カセット給紙の設定後brHL6050DrcをbrHL6050DrcA4C1としてコピーしたもの

[HL6050D]
Language=LANG_USA
Resolution=600
PaperSource=Tray1
Duplex=OFF
DuplexType=Long
PaperType=A4
Media=PlainPaper
Copies=1
Sleep=PrinterDefault
TonerSaveMode=OFF

*brprintconfコマンドにてA4手差し給紙の設定後brHL6050DrcをbrHL6050DrcA4MPとしてコピーしたもの

[HL6050D]
Language=LANG_USA
Resolution=600
PaperSource=MpTray
Duplex=OFF
DuplexType=Long
PaperType=A4
Media=PlainPaper
Copies=1
Sleep=PrinterDefault
TonerSaveMode=OFF

以上のようになります。

トップ > 日医標準レセプトソフト > 運用のための各種設定 > 検証済みプリンタ > ブラザー > ブラザー工業製 プリンタ(HL-6050DN)woody設定手順書書

このページのトップへ