url2png
node.js library for url2png
Get your account at http://url2png.com/
Installation
$ npm install url2png
Usage
var url2png = 'API_KEY' 'PRIVATE_KEY'; var screenshotUrl = url2png;
Params
Url
Name | type | description |
---|---|---|
url | string | The url encoded target url. |
Options
Name | type | default | description |
---|---|---|---|
viewport | string | 1280x1024 | The viewport for the browser. Max is 4000x4000 |
fullpage | boolean | false | Capture the entire page, even what is outside of the viewport. |
thumbnail_max_width | pixels | - | Maximum width of image returned. If not specified image return will be 1:1. |
delay | seconds | - | EXTRA delay in seconds to handle flash animation. You probably don't need this! We work hard to detect the right time to take the screenshot. |
force | boolean | false | Shall we use the cached version if it already exists? |
Type
Name | type | description |
---|---|---|
type | string | 'http', 'https' or empty for protocol-relative. |
Samples
var url2png = 'API_KEY' 'PRIVATE_KEY'; var options = viewport : '900x600' thumbnail_max_width : 400 var type = 'http'; //Get the URLvar url = url2png; //...or download the image to a filevar fs = ;url2png; //...or send the image in the http responsevar http = ;http;