Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 May 2009 12:49:03 +0200 (CEST)
From:      Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl>
To:        perryh@pluto.rain.com
Cc:        freebsd@edvax.de, freebsd-questions@freebsd.org
Subject:   Re: Canon printer and TurboPrint
Message-ID:  <alpine.BSF.2.00.0905291247030.10254@wojtek.tensor.gdynia.pl>
In-Reply-To: <4a1f9849.pQymwXa%2BJjy6Cj9K%perryh@pluto.rain.com>
References:  <20061208042111.GA709@host.my.domain> <fcb5effa0612072325x63b4c62boe0eff1ad3a51ad6b@mail.gmail.com> <23685866.post@talk.nabble.com> <20090524104618.0a62a935@scorpio> <23711563.post@talk.nabble.com> <20090525154816.3cee4b9a@scorpio> <20090526144939.d21275c2.freebsd@edvax.de> <b79ecaef0905270909kd81dabcpf22289b7781c2885@mail.gmail.com> <20090527133706.1a6e4612@scorpio> <20090528111158.aee9a44d.freebsd@edvax.de> <4a1f9849.pQymwXa%2BJjy6Cj9K%perryh@pluto.rain.com>

next in thread | previous in thread | raw e-mail | index | archive | help
>> CUPS isn't extra software in my opinions.
>
> CUPS is a PITA, but it may nevertheless be the "least bad"
> solution if one is stuck with a junk printer.

i really have nicer things to do that fighting with winprinter, when i can 
get normal printer for really low price.

> Decent, network-capable, PostScript printers do not have to be
> costly.  I bought a Samsung ML-2571N at Fry's for something like
> $60(US) a year or two ago.  All I had to do was plug it into the
> network, add its IP address to /etc/hosts, add a suitable entry
> to /etc/printcap, and lpr "just works".  No need to bother with
> CUPS.

postscript printers are easiest, but PCL as not much more difficult, just 
write simple filter using ghostscript.

Even not write - just modify existing examples like below

#!/bin/sh
#
#  ifhp - Print Ghostscript-simulated PostScript on a DesJet 500
#  Installed in /usr/local/libexec/hpif

#
#  Treat LF as CR+LF:
#
printf "\033&k2G" || exit 2

#
#  Read first two characters of the file
#
read first_line
first_two_chars=`expr "$first_line" : '\(..\)'`

if [ "$first_two_chars" = "%!" ]; then
     #
     #  It is PostScript; use Ghostscript to scan-convert and print it
     #
     /usr/local/bin/gs -dSAFER -dNOPAUSE -q -sPAPERSIZE=a4 -sDEVICE=ljet4 -sOutputFile=- - \
         && exit 0

else
     #
     #  Plain text or HP/PCL, so just print it directly; print a form
     #  at the end to eject the last page.
     #
     echo "$first_line" && cat && printf "\f" && exit 0
fi

exit 2




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.0905291247030.10254>