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.


In reply to Printing simple graphics by Dinosaur

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.