in reply to send color text to printer

Probably your best bet is to instead produce Postscript, or maybe TeX or some other format for which there's a to-Postscript converter. For monospace output, scribbling together some Postscript to do the job should be quite simple.

Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Re: send color text to printer
by jhasting (Initiate) on Aug 05, 2003 at 17:14 UTC

    Thanks, could you point me to an example of code, or module which produces postscript?

    thanks again
    J

    edited: Tue Aug 5 17:36:09 2003 by jeffa - removed unclosed pre tag, adding HTML formatting

      Google turns up A First Guide to PostScript as one of the first links for a query for postscript. I had a quick look, it seems like a decent intro.

      Don't fret, Postscript is both a complex graphical model and an actual complete language, which may seem intimidating at first, but you only need the very basics of that to just put some coloured text on a page.

      Makeshifts last the longest.

        Thanks again for the pointer, I did attempt to use postscript previously, but my Yahoo search did not yield as productive of a guide as you pointed me to. Here is my simple, quick code to populate every cell of a page with a unique character (which is what I needed). NOTE: it produces a large file. I thought I would post if anyone was interested.
        $COLOR{"0"} = "0 0 0"; $COLOR{"1"} = "0 0 1"; $COLOR{"2"} = "0 1 0"; $COLOR{"3"} = "0 1 1"; $COLOR{"4"} = "1 0 0"; $COLOR{"5"} = "1 0 1"; $COLOR{"6"} = "1 1 0"; $COLOR{"7"} = "1 1 1"; $SY{"0"} = "0"; $SY{"1"} = "1"; $SY{"2"} = "2"; $SY{"3"} = "3"; $SY{"4"} = "4"; $SY{"5"} = "5"; $SY{"6"} = "6"; $SY{"7"} = "7"; $SY{"8"} = "8"; $SY{"9"} = "9"; open OUT, ">test.ps"; print OUT "%!\n"; print OUT "72 72 scale\n"; print OUT ".25 .25 translate\n"; print OUT "/Courier findfont .095 scalefont setfont\n"; $sy1=1; $color=0; for ($y=1; $y<=148; $y++) { $sy = $sy1; $sy1++; if ($sy1 > 9) {$sy1 = 0;} for ($x=1; $x<=130; $x++) { $_x = $x*.060; $_y = $y*.070; print OUT "$COLOR{$color} setrgbcolor\n"; print OUT "$_x $_y moveto ($SY{$sy}) show\n"; $sy++; if ($sy > 9) {$sy=0;} $color++; if ($color > 7) {$color = 0;} } } print OUT "showpage\n"; close OUT; `lp test.ps`;