Bryan <bra...@gmail.com> wrote:

> I recently bought a Brother 9840CDW, which supports lpd and postscript.

>  It's valid as of the 24th of January 2011.  I have googled several
> sites, and found a site that was able to help me get a running config.
>  This meant I was able to successfully send something over my network
> to the printer.

There's an example entry "remote line printer" in /etc/printcap.
All you need to do is uncomment it and put in the DNS name of the
printer.

> I've sent a copy of the /etc/printcap to the printer,
> and while it does print the first line of the text correctly, the next
> line begins where the first line ends, but one line down

You say it's a PostScript printer but you didn't send it PostScript,
so what did you expect?

Actually, your printer happily accepts plain text.  However, Unix
terminates lines by a simple ASCII line feed character (0x0A, '\n').
Printers interpret this literally as a line feed and expect an
additional carriage return character (0x0D, '\r') to also start
printing from the beginning of the line.  You could use for instance
this to add the carriage returns:

$ perl -lpe '$_.="\r"' file | lpr

Or you can use a2ps or mpage from ports to turn plain text into
PostScript.

> And in a moment of ignorance, I wasted about 50 pages of paper
> when I sent a PDF to the printer.

You say it's a PostScript printer but you didn't send it PostScript,
so what did you expect?

Grab xpdf from ports to view and print the PDF file.  xpdf will
convert PDF to PostScript for printing.

> I've got the network portion down, but I think that I don't know
> enough about how filters work.  Do people create their own, or are
> there any 'recipes' out there that I can modify to work with my
> printer?

There are two approaches here.

(1) You take care to only send PostScript files to the printer.
    This isn't much of an inconvenience, since any X11 program with
    a print button will likely generate PostScript.

(2) You install something like apsfilter or magicfilter from ports
    to act as an input filter that will try to recognize the type
    of a file and automatically convert it to PostScript before
    passing it on to the printer.

Personally I find (1) to be sufficient and (2) not worth the hassle,
but your milage may vary.

-- 
Christian "naddy" Weisgerber                          na...@mips.inka.de

Reply via email to