Hello:

Thank you for your reply. My if filter follows:
#!/bin/sh
#
# kx-p1124 - Print Ghostscript-simulated Postscript on
a Panasonic KX-P1124
# installed in /usr/local/bin/kx-p1124

#

# 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.
        #
        /usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=lj \
        -sOutputFile=- - && 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 && exit 0
fi

exit 2

As you can see, there is nothing special about this. I
am suspecting I need to add a printf "0x0c" between the
last && cat and the && exit 0 just before the fi.

Thanks in advance for your help.

Harold.

On Sat, 28 May 2005 18:47:41 -0600 (MDT), Warren Block
wrote:

> 
> On Fri, 27 May 2005 [EMAIL PROTECTED] wrote:
> 
> > Could someone suggest a way to add a form feed to
the
> > end of a print document in LPR? I have a printer
that
> > doesn't eject the last page when the print job is
> > finished; and I can't seem to find this in the
manual.
> >
> > My guess is I need to add it to my printer filter,
but
> > its not clear to me what I need to add.
> 
> What printer filter do you have now?
> 
> -Warren Block * Rapid City, South Dakota USA
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to