Search code examples
phpruby-on-railsapiscreenshot

Webservice/API to grab a screenshot of another website? (known solutions are too slow)


From this question:-

https://stackoverflow.com/questions/1342611/is-there-a-webservice-api-to-grab-a-screenshot-of-another-website

and some other questions/google I got some results like:--

Can you suggest me something really fast and powerful. I am ready to pay for it. Isnt google providing any api for it? as they are showing screenshots in results.

EDIT:-- Also I need something which capture complete home page. Not just one screen.


Solution

  • wkhmltopdf is the best API I've seen so far for that kind of stuff. it uses the Webkit rendering engine.

    http://code.google.com/p/wkhtmltopdf/

    http://code.google.com/p/wkhtmltopdf/wiki/IntegrationWithPhp

    Here's the manual for wkhtmltoimage:

    http://madalgo.au.dk/~jakobt/wkhtmltoxdoc/wkhtmltoimage_0.10.0_rc2-doc.html

    Following SleepyCod lead. I got the solution.

    Following these links you can setup a high quality pdf's gems and plugins installation guide.

    Same way you can generate PNG's too. :-)