Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Oct 2001 15:19:42 -0700 (PDT)
From:      Annelise Anderson <andrsn@andrsn.stanford.edu>
To:        Brian Rudy <berudy@earthlink.net>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Printing problems
Message-ID:  <Pine.BSF.4.10.10110101507460.13002-100000@andrsn.stanford.edu>
In-Reply-To: <3BC450D4.C08BCCFE@earthlink.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 10 Oct 2001, Brian Rudy wrote:

> Hello;
> 
>     I'm setting up a new system with FreeBSD V. 4.3.  I have a Brother
> laser printer which I have hooked up to a HP JetDirect box which
> networks my printer (for other purposes).  This works for all other
> applications.
> 
>     I set up my /etc/printcap file and the associated spooling stuff but
> when I print, I get the first line of print, the second line is indented
> and the rest of the print isn't there.  At least I can talk to the
> printer and see it is printing "something" but not what I am looking
> for.  I am not using any filters (which is probably my problem).  Can
> someone help me out in my endeavors?
> 
> Thank you in advance for any help.
> 
It sounds like you're sending text files with a unix line ending 
to a printer that expects dos line endings (carriage return-line feed).

The unix2dos port (there's also dos2unix) takes care of this.
You can also do it with a filter; some are described in the handbook.

A printer that uses or emulates Hewlett-Packard's Printer Control
Language (PCL) could use the following filter, installed as 
/usr/local/libexec/hpif and referenced in the printcap definition for the
printer as
	:if=/usr/local/libexec/hpif:\

#!/bin/sh
# hpif, a filter for PCL printers
printf "\033E\033&k2G" && /bin/cat && printf
	"\033E" && exit 0

exit 2

Basically that sends an escape to the printer (resetting it), converts
the line endings to carriage return + line feed, and sends another
escape sequence to the printer at the end of the job to reset the
printer again. (Make the file executable and owned root:wheel.)

Annelise

-- 
Annelise Anderson
Author of: 		 FreeBSD: An Open-Source Operating System for Your PC
Available from:	 mall.daemonnews.org and amazon.com
Book Website:    http://www.bittreepress.com/FreeBSD/introbook/	




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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