This is my second summary to my original question about printing HTML
documents on Solaris. An excerpt from my original question follows:
> What I'm shooting for is something like this. The user runs the new
> application, which produces a number of HTML files. The user then uses
> some command like:
> command -d printer file1.html file2.html ...
> (or something similar) and the files are printed on the specified
> printer. The important thing here is that the files, when printed,
> the same as they do in a browser window.
An excerpt from my first summary follow:
> Many people suggested Lynx. I tried that, but HTML printed in Lynx
> the way they appear in the Lynx screen (naturally), whereas I needed
> something which handled the various fonts and sizes associated with
> different HTML attributes. Basically, I need to emulate the Print
> function of either the Netscape GUI or the Internet Explorer GUI.
> Other people suggested html2ps. I tried that too, but it doesn't
> HTML tables properly, and all the HTML documents in question use
> *sigh* That was the best answer by far, however, since it was the
> closest thing to what I need.
> One person suggested lwprequest, a Perl program. However, that
> also doesn't support tables.
I received many more replies after posting the summary. Now that I have
fixed the problem, I thought I'd share it with all of you.
Adam Singer suggested I look at a product called RosettaMan (a.k.a.
Polyglot) which seems to convert files from one format to another. I
didn't get a chance to try this before I found another way.
Most people suggested I look at
http://home.netscape.com/newsref/std/x-remote.html. I did, and that's
where the answer lies. I use a command sequence like this:
netscape -noraise -remote "openURL(file:<path>)" -remote "print()"
This works, but only on versions of Netscape prior to 4. If you try this
on Netscape 4.04, you get a pop-up dialog box where you can input your
printer configuration. Naturally, that's no good in a batch script.
Thanks go to email@example.com, Ray Browning, Stephen Harris, Dan
Pritts, Anthony Worrall, Shriman Gurung, M. Hawkins, Ryan Clutter, and
especially to Rachel Polanski for her many correspondences.
Gilbert Laustsen Jung Associates Ltd.
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:29 CDT