From owner-freebsd-questions Wed Oct 10 15:30: 7 2001 Delivered-To: freebsd-questions@freebsd.org Received: from andrsn.stanford.edu (andrsn.Stanford.EDU [171.66.112.163]) by hub.freebsd.org (Postfix) with ESMTP id 336DE37B406 for ; Wed, 10 Oct 2001 15:30:02 -0700 (PDT) Received: from localhost (andrsn@localhost.stanford.edu [127.0.0.1]) by andrsn.stanford.edu (8.9.3/8.9.1) with ESMTP id PAA13116; Wed, 10 Oct 2001 15:19:43 -0700 (PDT) Date: Wed, 10 Oct 2001 15:19:42 -0700 (PDT) From: Annelise Anderson To: Brian Rudy Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Printing problems In-Reply-To: <3BC450D4.C08BCCFE@earthlink.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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