node-phantom icon indicating copy to clipboard operation
node-phantom copied to clipboard

Pass paramaters to render?

Open starsinmypockets opened this issue 11 years ago • 2 comments
trafficstars

Looking at the source, looks like pageCreated -> render only accepts filename and callback params... Any way to pass further options to the native phantom render method....

eg {format:png}

starsinmypockets avatar Feb 20 '14 21:02 starsinmypockets

@starsinmypockets: Where do you see that the native render method supports a file types options? I'm looking at the docs for the render method here:

http://phantomjs.org/api/webpage/method/render.html

It says:

Currently, the output format is automatically set based on the file extension.

I don't see the abilty to pass in a specific file type as you are suggesting.

markstos avatar Mar 03 '14 19:03 markstos

Is the problem resolved ? page.render('google_home.jpeg', {format: 'jpeg', quality: '100'});

zhouseahe avatar Jul 16 '14 05:07 zhouseahe