Skip to content

goodylabs/screenshot-service

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Screenshot as a service with phantomJS headless browser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%