Skip to content

Commit

Permalink
fix rendering whole page height
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed May 13, 2015
1 parent a92d697 commit cd18301
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/Spatie/Browsershot/Browsershot.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,13 @@ public function save($targetFile)
throw new Exception('could not create screenshot');
}

$imageManager = new ImageManager();
$imageManager->make($targetFile)
->crop($this->width, $this->height, 0, 0)
->save($targetFile, 60);
if ($this->height > 0) {
$imageManager = new ImageManager();
$imageManager
->make($targetFile)
->crop($this->width, $this->height, 0, 0)
->save($targetFile, 60);
}

return true;
}
Expand Down

0 comments on commit cd18301

Please sign in to comment.