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`;
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.