domains/remove_print_css.js
[app.webkitpdf] / webkitpdf.php
index 594d63a..4c470b5 100644 (file)
@@ -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,7 +71,7 @@ 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(basename($out)).  '"');