Put another way, here's my web page:

/usr/bin/curl --cookie ~/.cookies 'http://somewhere.com'

And I'm looking for a command that goes something like

/usr/bin/curl --cookie ~/.cookies 'http://somewhere.com' | render_raw_html_to_image | lpr
link|improve this question
i.e. I'm trying to print the actual, rendered web page. Not the source code. Any browser rendering will do. – Aaron F. Aug 5 '09 at 8:46
feedback

4 Answers

up vote 8 down vote accepted

You can use firefox with the Command Line Print extension.

firefox -print http://www.example.com/index.html
firefox -print http://www.example.com/index.html -printmode pdf -printfile ../foo.pdf
firefox -print http://www.example.com/index.html -printmode PNG
firefox -print http://www.example.com/index.html -printdelay 10

source

link|improve this answer
feedback

You could try using wkhtmltopdf, which uses the webkit engine to render an HTML page into a PDF file. Then you can print the PDF.

link|improve this answer
feedback

http://htmldoc.org/ may help.

link|improve this answer
feedback

You can use links with the dump switch:

links www.google.com -dump > formatedOutput.txt

And the same with lynx:

lynx www.google.com -dump > formatedOutput.txt

And yet again, the same with w3m:

w3m www.google.com -dump > formatedOutput.txt
link|improve this answer
Oh, missed the raw_image image part, it was cut off by the scroll bar in my browser :-) – Kyle Brandt Aug 5 '09 at 11:46
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.