Skip to content

Commit

Permalink
Background color setted to white as default
Browse files Browse the repository at this point in the history
  • Loading branch information
MASNathan committed Jan 25, 2016
1 parent f0ee8c4 commit fac4d41
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions templates/screen-capture.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,20 @@
page.viewportSize = {width: <?= $width ?>, height: <?= $height ?>};

<?php if (isset($clipWidth) && $clipWidth && isset($clipHeight) && $clipHeight) : ?>
page.clipRect = {
page.clipRect = {
top: 0,
left: 0,
width: <?= $clipWidth ?>,
height: <?= $clipHeight ?>
};
};
<?php endif ?>

page.open('<?= $url ?>', function () {
/* This will set the page background color white */
page.evaluate(function() {
document.body.bgColor = '#FFFFFF';
});

page.render('<?= $imageLocation ?>');
phantom.exit();
});

0 comments on commit fac4d41

Please sign in to comment.