From 1056f541251d37794ac7b9899f0b39f4d4ad3709 Mon Sep 17 00:00:00 2001 From: stevevg Date: Sat, 2 Feb 2019 14:08:20 +0100 Subject: [PATCH] Adding file size to browser download window (#548) --- src/PDF.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PDF.php b/src/PDF.php index 715ddd4..6fd13e8 100644 --- a/src/PDF.php +++ b/src/PDF.php @@ -169,7 +169,8 @@ public function download($filename = 'document.pdf' ){ $output = $this->output(); return new Response($output, 200, array( 'Content-Type' => 'application/pdf', - 'Content-Disposition' => 'attachment; filename="'.$filename.'"' + 'Content-Disposition' => 'attachment; filename="'.$filename.'"', + 'Content-Length' => strlen($output), )); }