Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
This is a Node.js module which takes a URL to a page and renders preview images of different sizes using the PhantomJS rendering engine.
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
README.md
index.js
package.json

README.md

Webpage Preview

This is a Node.js module which takes a URL to a page and renders preview images of different sizes using the PhantomJS rendering engine.

Example usage:

webpagePreview.generatePreview('http://www.google.com/', 'google', APP_ROOT + '/public/previews', null, null, function(error, sizePaths) {
    if (error) {
        console.log(error);
    }
    else {
        console.log(sizePaths);
    }
});

Sample return

sizePaths =

{
  "full": "\/home\/cjdell\/Projects\/web-monitor\/public\/previews\/google\/full.png",
  "small": "\/home\/cjdell\/Projects\/web-monitor\/public\/previews\/google\/small.png",
  "medium": "\/home\/cjdell\/Projects\/web-monitor\/public\/previews\/google\/medium.png",
  "large": "\/home\/cjdell\/Projects\/web-monitor\/public\/previews\/google\/large.png"
}

Installation:

npm install webpage-preview
Something went wrong with that request. Please try again.