Skip to content

Commit

Permalink
Merge pull request #9 from rintisch/fix_issue_nr_7
Browse files Browse the repository at this point in the history
Fix `saveToOutput` of PdfService. Closes #7.
  • Loading branch information
ervaude authored Aug 22, 2020
2 parents 102e8a5 + 151a3f9 commit b6d0199
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/Service/PdfService.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ public function saveToOutput(string $fileName)
header('Pragma: no-cache', true);
header('Expires: 0', true);
header('Cache-Control: must-revalidate, post-check=0, pre-check=0', true);
header('Cache-Control :private');
header('Cache-Control: private');
header('Content-Type: application/pdf', true);

$agent = strtolower(GeneralUtility::getIndpEnv('HTTP_USER_AGENT'));
$dispo = (strpos($agent, 'win') !== false && strpos($agent, 'msie') !== false) ? '' : 'attachment; ';

header('Content-Transfer-Encodin :binary', true);
header('Content-Transfer-Encoding: binary', true);
header('Content-Disposition: ' . $dispo . 'filename="' . $fileName . '"', true);
header('Content-Length: ' . filesize($absoluteFilePath), true);

Expand Down

0 comments on commit b6d0199

Please sign in to comment.