Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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
share|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

4 Answers 4

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


share|improve this answer
this appears to be deprecated :( –  Patrick McCann Oct 2 '14 at 19:48

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.

share|improve this answer

http://htmldoc.org/ may help.

share|improve this answer

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
share|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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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