After doing setting page.clipRect
followed by page.render
, how can you disable clipRect
so that subsequent page renders are of the entire viewport?
page.clipRect = {top:0, left:0, height: 10, width: 10} ;
page.render('screencap.png'); // cropped image
page.clipRect = '';
page.render('fullscreen.png'); // still cropped image!
Simply reset all values for clipRect
:
page.clipRect = { left:0, top:0, width:0, height:0 }
then PhantomJS will recapture the entire content again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With