Either way, you are faced with the same problem if you want to format and then print. You either:
- 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.
- 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
-
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.
|