Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass "options" object to render method #119

Open
danielguajardok opened this issue Feb 26, 2016 · 1 comment
Open

Pass "options" object to render method #119

danielguajardok opened this issue Feb 26, 2016 · 1 comment

Comments

@danielguajardok
Copy link

Any chance we can pass an "options" object to the render method, so we can modify the quality of the exported image?

@Reewr
Copy link

Reewr commented Feb 27, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants