Screenshot as a service with phantomJS headless browser
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE Initial commit Jul 19, 2013
README.md Update README.md Jul 20, 2013
Routes.js first commit Jul 20, 2013
renderElement.js first commit Jul 20, 2013
server.js first commit Jul 20, 2013

README.md

screenshot-service

Screenshot as a service with phantomJS headless browser

This is a small utility which makes a webservice to render the screenshot of any page. Credit goes to @trevordixon for his awesome express like router

Usage

git clone https://github.com/arunkjn/screenshot-service.git
cd screenshot-service
phantomjs server.js "YOUR_PORT_HERE"
  • A server will start on your specified port, 8000 is the default port used.

  • You can send a POST request now to YOUR_IP:PORT with the following options and get back a base64 encoded png image

    • url = "some_url" This parameter is required
    • timeout = "timeout in milliseconds to allow the page to load" defaults to 1000ms
    • width = "width of browser window" defaults to 1366px
    • height = "height of browser window" defaults to 768px

License

MIT