Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Either way, you are faced with the same problem if you want to format and then print. You either:

  1. Use an existing application that knows how to format the data format the file is in, and drive that from Perl.

    Which is the Win32::GUI or Win32::OLE method.

  2. Try to render the formatting yourself.

    This is by far the harder task. Even with years, and hundreds or even thousands of man hours behind them, both browsers and Adobe's reader still don't always make a great job of printing their formats. Doing it your self is extremely hard in the case of html, and both extremely hard and possibly illegal in the case of PDF.

If your very unfussy about the way the output is rendered you might get away with using something like the linx text browser to render the html or ghostscript for the PDF, but neither is very satisfactory.

I'm not sure, but I seem to remember that at least one of the popular browsers had a command line switch that would cause it to render the url supplied, print to the default printer and then exit--but I don't recall where I got that notion from?


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon

In reply to Re^3: Win32 Printing by BrowserUk
in thread Win32 Printing by bkiahg

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 lurking in the Monastery: (3)
As of 2024-04-19 20:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found