Compare commits
2 commits
6c82523cc8
...
3d386f4c66
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3d386f4c66 | ||
|
|
3ade5bca9e |
2 changed files with 3 additions and 0 deletions
|
|
@ -60,7 +60,9 @@ class GenerateController
|
|||
}
|
||||
|
||||
// Retourner le PDF
|
||||
$filename = !empty($data['filename']) ? basename($data['filename']) : 'document.pdf';
|
||||
header('Content-Type: application/pdf');
|
||||
header('Content-Disposition: attachment; filename="' . $filename . '"');
|
||||
header('Content-Length: ' . strlen($pdf));
|
||||
echo $pdf;
|
||||
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ class PdfGenerator
|
|||
$cmd .= escapeshellcmd($this->config['pagedjs_bin']);
|
||||
$cmd .= ' ' . escapeshellarg($url);
|
||||
$cmd .= ' -o ' . escapeshellarg($pdfFile);
|
||||
$cmd .= ' --print-background';
|
||||
|
||||
if (!empty($options['timeout'])) {
|
||||
$cmd .= ' --timeout ' . (int)$options['timeout'];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue