"be consistent" | |
PerlMonks |
Printing simple graphicsby Dinosaur (Beadle) |
on Mar 21, 2001 at 01:34 UTC ( [id://65828]=perlquestion: print w/replies, xml ) | Need Help?? |
Dinosaur has asked for the wisdom of the Perl Monks concerning the following question: I want to print a calendar page. Initially just a 7x5 grid of boxes with dates and a simple "March 2001" page header, then I'll add schedule notes etc. But I'd like it to look reasonably professional, which means real graphics rather than faking it with characters. I want to send the output straight to a printer. I'd like to do this under both *nix and MSWindows. The O'Reilly "Programming Web Graphics with Perl" book suggests generating postscript. They recommend a module (whose name I forget, don't have the book handy). For my purposes I could just as easily crank out the PS directly. But how do I print that? My Epson 740 is not a native PS speaker (right?), so when I send it PS language, it happily prints the PS source. I'd need Ghostscript, I guess? I gather that will let me create a "virtual" PS printer. Can I speak directly to Ghostscript from perl, hand it a scalar full of PS source and say, "Here, print this"? Or I could go the graphics route, and create a .gif (.png?) file. Again, how do I print that directly from perl? Or is there a simpler way? Your insights are solicited.
Back to
Seekers of Perl Wisdom
|
|