Skip to content

Commit e0ef3da

Browse files
committed
fixed content length bug
1 parent 75119f2 commit e0ef3da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Spiritix/HtmlToPdf/Output/DownloadOutput.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ public function download($fileName, $exit = true)
4949
header('Content-Type: application/pdf', false);
5050
header('Content-Disposition: attachment; filename="' . basename($fileName) .'";');
5151
header('Content-Transfer-Encoding: binary');
52-
header('Content-Length: ' . mb_strlen($this->getPdfData()));
52+
header('Content-Length: ' . strlen($this->getPdfData()));
5353

5454
echo $this->getPdfData();
5555

5656
if ($exit === true) {
5757
exit;
5858
}
5959
}
60-
}
60+
}

0 commit comments

Comments
 (0)