Hallo!
Ich habe einen kyocera FS 1000 am Parallelport angeschlossen, jedoch Probleme.
Ich habe versucht, genau nach Handbuch vorzugehen, der Drucker druckt auch. Jedoch trotz des installierten Filters druckt er falsche Sonderzeichen im Plain Text (ist ja nicht dramatisch, ps benötige ich vermutlich eh öfters) und Postscipt nur als Befehls-Kauderwelsch (halt die Befehle direkt als Text).
Mittels CUPS hat erst der Dämon nicht gestartet, nach manuellem Start musste ich feststellen, dass der im Gegensatz zu Debian den Kyocera nicht kennt.
Wie bekomme ich den Drucker nun ans laufen?
Meine /etc/printcap
kyocera|lp|Kyocera FS-1000:\
:sh:sd=/var/spool/kyocera:\
:lp=/dev/lpt0:\
:if=/usr/local/libexec/ifkyocera:
meine /usr/local/libexec/ifkyocera (die ich nicht verstehe, aber aus dem Hanbuch übernommen habe).
#!/bin/sh
#
# ifhp - Print Ghostscript-simulated PostScript on a Kyocera 1000
# Installed in /usr/local/libexec/ifkyocera
#
# Treat LF as CR+LF:
#
printf "\033&k2G" || exit 2
#
# Read first two characters of the file
#
IFS="" read -r first_line
first_two_chars=`expr "$first_line" : '\(..\)'`
if [ "$first_two_chars" = "%!" ]; then
#
# It is PostScript; use Ghostscript to scan-convert and print it.
#
# Note that PostScript files are actually interpreted programs,
# and those programs are allowed to write to stdout, which will
# mess up the printed output. So, we redirect stdout to stderr
# and then make descriptor 3 go to stdout, and have Ghostscript
# write its output there. Exercise for the clever reader:
# capture the stderr output from Ghostscript and mail it back to
# the user originating the print job.
#
exec 3>&1 1>&2
/usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=kyocera \
-sOutputFile=/dev/fd/3 - && exit 0
else
#
# Plain text or HP/PCL, so just print it directly; print a form feed
# at the end to eject the last page.
#
echo "$first_line" && cat && printf "\033&l0H" &&
exit 0
fi
exit 2
Vielen Dank für eure Hilfe!
Uwe
Ich habe einen kyocera FS 1000 am Parallelport angeschlossen, jedoch Probleme.
Ich habe versucht, genau nach Handbuch vorzugehen, der Drucker druckt auch. Jedoch trotz des installierten Filters druckt er falsche Sonderzeichen im Plain Text (ist ja nicht dramatisch, ps benötige ich vermutlich eh öfters) und Postscipt nur als Befehls-Kauderwelsch (halt die Befehle direkt als Text).
Mittels CUPS hat erst der Dämon nicht gestartet, nach manuellem Start musste ich feststellen, dass der im Gegensatz zu Debian den Kyocera nicht kennt.
Wie bekomme ich den Drucker nun ans laufen?
Meine /etc/printcap
kyocera|lp|Kyocera FS-1000:\
:sh:sd=/var/spool/kyocera:\
:lp=/dev/lpt0:\
:if=/usr/local/libexec/ifkyocera:
meine /usr/local/libexec/ifkyocera (die ich nicht verstehe, aber aus dem Hanbuch übernommen habe).
#!/bin/sh
#
# ifhp - Print Ghostscript-simulated PostScript on a Kyocera 1000
# Installed in /usr/local/libexec/ifkyocera
#
# Treat LF as CR+LF:
#
printf "\033&k2G" || exit 2
#
# Read first two characters of the file
#
IFS="" read -r first_line
first_two_chars=`expr "$first_line" : '\(..\)'`
if [ "$first_two_chars" = "%!" ]; then
#
# It is PostScript; use Ghostscript to scan-convert and print it.
#
# Note that PostScript files are actually interpreted programs,
# and those programs are allowed to write to stdout, which will
# mess up the printed output. So, we redirect stdout to stderr
# and then make descriptor 3 go to stdout, and have Ghostscript
# write its output there. Exercise for the clever reader:
# capture the stderr output from Ghostscript and mail it back to
# the user originating the print job.
#
exec 3>&1 1>&2
/usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=kyocera \
-sOutputFile=/dev/fd/3 - && exit 0
else
#
# Plain text or HP/PCL, so just print it directly; print a form feed
# at the end to eject the last page.
#
echo "$first_line" && cat && printf "\033&l0H" &&
exit 0
fi
exit 2
Vielen Dank für eure Hilfe!
Uwe