On Sun, Jan 30, 2011 at 10:47, Christian Weisgerber <na...@mips.inka.de>
wrote:
> Bryan <bra...@gmail.com> wrote:
>
>> I recently bought a Brother 9840CDW, which supports lpd and postscript.
>
>> B It's valid as of the 24th of January 2011. B I have googled several
>> sites, and found a site that was able to help me get a running config.
>> B 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?
>

I did convert a pdf to ps using 'pdf2ps', but it still printed
gibberish.  I installed xpdf, and I see that now there is a 'pdftops'

> Actually, your printer happily accepts plain text. B 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. B You could use for instance
> this to add the carriage returns:
>
> $ perl -lpe '$_.="\r"' file | lpr
>

I had an example text file with the following output in it...



!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdef
"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefg
#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgh
$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi
%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij


with your bit of perl, it prints correctly.  Without it, it prints
with the output similiar to below.


> 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. B xpdf will
> convert PDF to PostScript for printing.
>

Yea, that failed too...  here is a rough example of what it looks like:

%!PS-Adobe-3.0
                          % Produced by xpdf/pdftops 3.02

         %%Creator: Qt 3.3.8

and i power cycled the printer before I lost another 9 or ten pages.
I created the pdf in kword, and it has one line that says "This is a
test to print."  Renders just fine in xpdf and zathura, but the
printer prints the above.  This is similiar to how the text file I
sent last night looks like.

> There are two approaches here.
>
> (1) You take care to only send PostScript files to the printer.
> B  B This isn't much of an inconvenience, since any X11 program with
> B  B a print button will likely generate PostScript.
>
> (2) You install something like apsfilter or magicfilter from ports
> B  B to act as an input filter that will try to recognize the type
> B  B of a file and automatically convert it to PostScript before
> B  B passing it on to the printer.
>
> Personally I find (1) to be sufficient and (2) not worth the hassle,
> but your milage may vary.

If xpdf didn't work, I doubt any program with a 'print' button is
going to "just work".

Reply via email to