projects
/
app.webkitpdf
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Uncommited changes synced
[app.webkitpdf]
/
webkitpdf.php
diff --git
a/webkitpdf.php
b/webkitpdf.php
index
f12564d
..
4c470b5
100644
(file)
--- a/
webkitpdf.php
+++ b/
webkitpdf.php
@@
-54,7
+54,9
@@
class WebkitPdf
unlink($outpr);
$out = $outpr .'.pdf';
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 . ' ';
" --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("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-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');
ini_set('display_errors', 0);
$fh = fopen($out, 'rb');