Print HTML file via shell command
leon_xf_pu at yahoo.com.cn
Wed Nov 2 14:31:57 UTC 2005
--- Dave Cross <davorg at gmail.com> wrote:
> On 11/1/05, Berna Massingill <bmassing at cs.trinity.edu> wrote:
> > On Tue, Nov 01, 2005 at 09:02:04AM -0800, Leon Pu wrote:
> > >> I want to print out the HTML file in its web page format, not
> the HTML
> > >> source.
> > >>
> > >> It's better to print out the HTML file in web format via one
> > >> command likes [htmllpr foo.html].
> > >>
> > >> If there is no possibility to print out HTML via shell command
> > >> directly, is it possbile to convert the HTML file to PDF or
> > >> by shell then I can print out?
> > >>
> > >> Thanks for your reply.
> > There's a program "html2ps" that I think will do what you want.
> It's a
> > Perl script, and a Google search for "html2ps" should find it.
> Last time I tried to use that, it was a little clunky. It may have
> improved in the last couple of years though.
I also found this tool, I will try it later.
> Given that Firefox has a pretty decent 'print to ps' option, it's
> disappointing that you can't access it from the command line. It
> be great to be able to script stuff like
> $ firefox --as_ps http://example.com/ > example.ps
I was shocked that web browsers cannot print html file via command,
even these browsers have their own shell command.
Lynx can dump the web page to plain text, but the character size will
also lost together with images.
Start your day with Yahoo! - Make it your home page!
More information about the users