Gentoo Archives: gentoo-user

From: Stroller <stroller@××××××××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] {OT} Printing text with lpr
Date: Wed, 01 Apr 2009 05:00:43
Message-Id: DC1FA951-456F-446D-BA96-1825DDC4E47B@stellar.eclipse.co.uk
In Reply to: Re: [gentoo-user] {OT} Printing text with lpr by Joseph
1 On 1 Apr 2009, at 04:25, Joseph wrote:
2 > On 03/31/09 19:40, Grant wrote:
3 >> I have a Brother QL-570 label printer printing on 29x90mm labels. My
4 >> goal is to have 6 characters printed across the center of the label.
5 >> It prints like this:
6 >>
7 >> $ echo 123456 | lpr
8 >>
9 >> but the text is in the upper corner of the label, it has the wrong
10 >> orientation, and the font is too small.
11 >>
12 >> It also prints like this:
13 >>
14 >> $ lpr test.png
15 >>
16 >> but the text doesn't come out very crisp, and I'd rather not create a
17 >> file with imagemagick for each label to print. Is there another way
18 >> to print large, properly oriented text on the fly?
19
20 With some printers it's possible to add control codes to the text
21 you're printing to do stuff like this.
22
23 EG:
24 http://www.sturec.com/help/printing/printers.htm
25 http://printers.necsam.com/public/printers/pclcodes/pcl5hp.htm
26
27 But it depends whether your printer driver supports them, and I very
28 much doubt any of the above will work for you. In some printers that
29 sort of stuff is implemented in hardware (firmware), but yours appears
30 to be a winprinter. I would look at the .ppd files first, to try & see
31 if the author has implemented anything like this.
32
33 I really understand where you're coming from not wanting to mess with
34 imagemagick, but at the end of the day *something* has to raster the
35 ASCII into little pixels, so it's not really that dirty & shameful if
36 you have to write a little wrapper script to do so. On my trusty olde
37 HP LaserJet 4000 it may be the onboard hardware PostScript™ which
38 converts the text into character shapes, but your little printer
39 doesn't have so much processing power, so the computer has to do the
40 rendering for it.
41
42 Thus a wrapper script that calls imagemagick and converts $1 into an
43 image file may merely be considered a "userspace driver". If you make
44 the image larger, is this reflected on the printer's output, or does
45 it perhaps get sharper? Is it possible to change the DPI of
46 imagemagick's output? If you run lpr on images of other formats, do
47 they print? You may find a different file format might be sharper, or
48 you might find that postscript files work (handled by CUP's built-in
49 software renderer) and that you can use Ghostscript or something to
50 manipulate the output.
51
52 I assume you've read all of this guy's pages:
53 http://etc.nkadesign.com/Printers/QL550LabelPrinterPerl
54 http://etc.nkadesign.com/Printers/QL550LabelPrinter
55
56 > It is not very well supported under Linux:
57 > http://openprinting.org/show_printer.cgi?recnum=Brother-QL-570
58
59 Have you found these pages useful in the past? My experience is that
60 hardly anyone ever bothers to update such pages. :(
61
62 I'm not saying it's exactly a wonderprinter, famed in fable & song,
63 but the only thing I find helpful on there is the link to a page which
64 links to the etc.nkadesign.com pages. From the looks of those one
65 should be able be able to do something fairly useful with this
66 printer, depending upon one's mad skillz.
67
68 Stroller.

Replies

Subject Author
Re: [gentoo-user] {OT} Printing text with lpr Grant <emailgrant@×××××.com>