Skip to content

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.

Notifications You must be signed in to change notification settings

cjdell/webpage-preview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published