node-phantom-simple
node-phantom-simple copied to clipboard
Pass "options" object to render method
Any chance we can pass an "options" object to the render method, so we can modify the quality of the exported image?
The page.render
function accepts three arguments as can be seen on PhantomJSs API: webpage.render. The first being the filename, the second being the format and the third being the quality.
If you want to set the quality of the exported image, you could do something like this:
webpage.render('filename.png', 'png', 100, function(err) {
// Done rendering
});
If you really need the options to be an object, you could look into higher level libraries based on this wrapper.