藤岡@福島市です。
> これsourceは非公開なのですかねぇ...
> 見当たらなかったのですが。
> gsを使わないで独自にレンダラを含んでるのかなぁ。
>
>
>>ただ、starsuite6やOpenOfficeやkonquerからは日本語の
>>印字が問題なく行えるのですが、lpr article9.psや
>>mozillaからは日本語が文字化けしますね。
>
>
> PSデータの文字が化けるのはPSプリンタでないのであれば
> ライスタライズする時の問題でしょうから
> source非公開ならブラザーに問い合わせるのが良いかと。
>
>
>>ドライバはVineでの対応はしていないので、
>>RedHatのlpr用のものを使いました。
>
>
> という事ならgs使うんじゃないのか?
> pstorasterはどこで行うのかなぁ...
> それともブラザー独自のPDLがあってそれにPSからベクターデータで
> 出力させてるのか...
>
filterMF9800 -> psconvert -> rawtobr
というようにプログラムを経由しています。
最後のプログラムはバイナリなのですが、最初の2つはGPL2って書いてますし、
シェルなので添付してしまいます。
んで、見た感じpsconvertでgsを使っているようにも見えます。
ブラザーに問い合わせたらテストしてないという答えだったんですね。
時間ができたらまた眺めてみます。
#! /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="MFC-9800J"
PRINTER_TMP=$(echo $PRINTER | sed -e 's/ //g' -e 's/-//g')
BR_PRT_PATH=/usr/local/Brother/
RCFILE=`eval echo $BR_PRT_PATH/inf/brPRINTERrc | 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/brPRINTERrc | 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
#/bin/sh
#
# psconert [Paper_inf] [rc_file]
# 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
#
PAPER_INF=$1
RC_FILE=$2
# get Paper Type
PAPER_TYPE=`sed -n '/PaperType/p' $RC_FILE`
PAPER_TYPE=`echo $PAPER_TYPE | sed -e 's/ //g' -e 's/PaperType=//'`
# get Resolution
RESOLUTION=`sed -n '/Resolution/p' $RC_FILE`
RESOLUTION=`echo $RESOLUTION | sed -e 's/ //g' -e 's/Resolution=//'`
# get paper size
LINE=`eval sed -n '/^"$PAPER_TYPE"/p' $PAPER_INF`
WIDTH=$LINE
HEIGHT=$LINE
WIDTH=`echo $WIDTH | sed -e 's/^.*:[ ]//' -e 's/[ ].*//'`
HEIGHT=`echo $HEIGHT | sed -e 's/^.*[ ]//'`
if [ "$RESOLUTION" = "300" ] ; then
WIDTH=`expr $WIDTH / 2`
HEIGHT=`expr $HEIGHT / 2`
elif [ "$RESOLUTION" = "1200" ] ; then
WIDTH=`expr $WIDTH \* 2`
HEIGHT=`expr $HEIGHT \* 2`
fi
GHOST_SCRIPT=`which gs`
OUTPUT_TYPE=bit
GHOST_OPT="-q -dNOPROMPT -dNOPAUSE -dSAFER -sDEVICE=$OUTPUT_TYPE -sOutputFile=- - -c quit"
exec $GHOST_SCRIPT -r$RESOLUTION -g${WIDTH}x${HEIGHT} $GHOST_OPT