Reputation: 63687
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!
Upvotes: 6
Views: 2008
Reputation: 12561
Simply reset all values for clipRect
:
page.clipRect = { left:0, top:0, width:0, height:0 }
then PhantomJS will recapture the entire content again.
Upvotes: 19