Merge pull request #6 from luckyjay/master

Remove clipRect setting to fix rendering
This commit is contained in:
Christian Haschek 2016-01-10 12:11:48 +01:00
commit 102b39235d
2 changed files with 3 additions and 4 deletions

View File

@ -146,7 +146,7 @@ class http2pic
function renderPagePHANTOMJS() function renderPagePHANTOMJS()
{ {
$cmd = 'timeout '.$this->params['timeout'].' '.PHANTOMJSPATH; $cmd = 'timeout '.$this->params['timeout'].' '.PHANTOMJSPATH;
$cmd.= ' '.__DIR__.'/phantom.js '; $cmd.= ' --ignore-ssl-errors=yes --ssl-protocol=any '.__DIR__.'/phantom.js ';
$cmd.= ($this->params['url']); $cmd.= ($this->params['url']);
$cmd.= ','.($this->params['file']); $cmd.= ','.($this->params['file']);
@ -279,7 +279,7 @@ class http2pic
function isURLReachable($url) function isURLReachable($url)
{ {
$ch = curl_init($url); $ch = curl_init($url);
curl_setopt($ch, CURLOPT_NOBODY, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_exec($ch); curl_exec($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE); $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);

View File

@ -13,7 +13,6 @@ var js = input[4];
var pageWidth = (vp_w!="")?parseInt(vp_w, 10):1024; var pageWidth = (vp_w!="")?parseInt(vp_w, 10):1024;
var pageHeight = (vp_h!="")?parseInt(vp_h, 10):'auto'; var pageHeight = (vp_h!="")?parseInt(vp_h, 10):'auto';
page.viewportSize = { width: pageWidth, height: pageHeight }; page.viewportSize = { width: pageWidth, height: pageHeight };
page.clipRect = { top: 0, left: 0, width: pageWidth, height: pageHeight };
page.settings['javascriptEnabled'] = (js=="no")?false:true; page.settings['javascriptEnabled'] = (js=="no")?false:true;
page.open(address, function (status) { page.open(address, function (status) {
@ -26,4 +25,4 @@ page.settings['javascriptEnabled'] = (js=="no")?false:true;
phantom.exit(); phantom.exit();
}, 200); }, 200);
} }
}); });