Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-25 21:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found