Skip to content
A PhantomJS Web Server that takes a screenshot from a requested Web page.
JavaScript
Tree: 0d065948e2
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
ScreenShotServer.js

README.md

Web Server that takes Screenshots and returns a .png image to the browser.

Note: you need to install PhantomJS version 1.98 or below

Running ScreenShotServer Web server

Usage 1:

phantomjs ScreenShotServer.js < portnumber >

Usage 2:

phantomjs ScreenShotServer.js < portnumber > < rootDomain >

Example 1:

phantomjs ScreenShotServer.js 8181

Example 2:

phantomjs ScreenShotServer.js 8181 google.pt

Requiring a Screenshot

Example: http://localhost:8181/?url=http://google.pt

Usage: http://localhost:/?url= < urlEncoded >

urlEncoded - The url to take a screenshot should be escaped using the javascript function encodeURIComponent

Optional parameters:

  • width - width in pixels of the screenshot rendering
  • height - height in pixels of the screenshot rendering

Example: http://localhost:8181/?url=http://google.pt&width=1920&height=1080

You can’t perform that action at this time.