X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=webkitpdf.php;h=4c470b51e303e4f487026ab73dc2ef2ada23b8f6;hb=6cef2d9683e5f19fb32cc92a5c7f6bb41b9b3f1c;hp=f12564dcf85f4064824b1efda79b2cf9f4838f5e;hpb=dc7523b76e38374f3c801f2fa98096bc75d763b2;p=app.webkitpdf diff --git a/webkitpdf.php b/webkitpdf.php index f12564d..4c470b5 100644 --- a/webkitpdf.php +++ b/webkitpdf.php @@ -54,7 +54,9 @@ class WebkitPdf unlink($outpr); $out = $outpr .'.pdf'; - $cmd = "timeout 30s $xvfb --auto-servernum $webkitpdf " . + // can take 2-5 minutes... + + $cmd = "timeout 300s $xvfb --auto-servernum $webkitpdf " . " --url " . escapeshellarg($_REQUEST['url']) . ' ' . " --pdf " . $out . ' '; @@ -69,10 +71,10 @@ class WebkitPdf header("Expires: "); header("Cache-Control: must-revalidate, post-check=0,pre-check=0"); header("Pragma: public"); - header("Last-Modified: " . gmdate("D, d M Y H:i:s", $ts) . " GMT"); + header("Last-Modified: " . gmdate("D, d M Y H:i:s", time()) . " GMT"); //header('Content-length: '. filesize($out)); - header('Content-Disposition: attachment; filename="' . htmlspecialchars($out). '"'); + header('Content-Disposition: attachment; filename="' . htmlspecialchars(basename($out)). '"'); ini_set('display_errors', 0); $fh = fopen($out, 'rb');