Jim Gibson wrote:
On 2/24/10 Wed Feb 24, 2010 11:49 AM, "boll" <[email protected]> scribbled:Hello- I am hoping there is a way to print HTML documents from a perl script. #!/usr/bin/perl -w use strict; use warnings; print "Content-Type: text/html\n\n"; open HTML, "table_one.html" or die $!; while( <HTML> ) { print; } close HTML; This displays the HTML code in the terminal window, but I need to produce the rendered page on a printer. Is there a module that will create printable HTML, or maybe a system or exec command that will print the documents? These are plain HTML tables, so I don't need beautiful formatting.For the former, search CPAN (<http://search.cpan.org>) for HTML conversion files. For example, there is HTML::FormatPS that claims to convert HTML to Postscript, but it doesn't do tables. For the latter, there are HTML::Display modules on CPAN that claim to send your output to a browser. There is also the html2ps program: <http://user.it.uu.se/~jan/html2ps.html> Rendering HTML is not easy, so your hopes may be hard to satisfy.
Thank You, Jim. I'll investigate those modules. -John -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
