Take the 2-minute tour ×
Server Fault is a question and answer site for professional 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
add comment

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

source

share|improve this answer
add comment

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
add comment

http://htmldoc.org/ may help.

share|improve this answer
add comment

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
add comment

Your Answer

 
discard

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.