One of the reasons that printer drivers exist is to provide a more generic interface to the specificities of different types of printers. And, like many modern OS's, Win32 manages the printer drivers for you.

You can poll the Win32 environment to determine what printers are available. For that, use the Win32::Printer::Enum module.

That module will tell you the driver names and ports on which the printers may be found.

After figuring out what printer you want to print to, you can use the Win32::Printer module to standardize your printing in a more generic way so that you don't have to deal with the differences between different makes of printers.

Be sure to read the POD for these modules. Installation appears to be a little tricky.

Another thought:
Not worrying about OS-dependant printing issues is one good argument for web-based applications versus workstation based applications. Most web browsers already know how to print. Creating a web-based application (Internet or Intranet) allows you to gloss over details such as "how the hell do I print?" If you're striving for quick development time, it's hard to beat a web-based application when you start needing to do things like printing and screen formatting. If development time isn't an issue, and a polished look is, then I guess it's time to turn to workstation-based applications. Of course one of the reasons people turn to Perl is quick development time. It is in keeping with that philosophy that I mention the web-based approach.


Dave


In reply to Re: Printer Format Attributes by davido
in thread Printer Format Attributes by UncleSteve

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.