We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20111ef commit f49563aCopy full SHA for f49563a
src/PDFMerger/PDFMerger.php
@@ -17,6 +17,7 @@
17
use Illuminate\Filesystem\Filesystem;
18
use Illuminate\Support\Collection;
19
use Illuminate\Support\Str;
20
+use Illuminate\Http\Response;
21
22
class PDFMerger {
23
@@ -104,7 +105,12 @@ public function stream(){
104
105
* @return string
106
*/
107
public function download(){
- return $this->oFPDI->Output($this->fileName, 'D');
108
+ $output = $this->output();
109
+ return new Response($output, 200, [
110
+ 'Content-Type' => 'application/pdf',
111
+ 'Content-Disposition' => 'attachment; filename="' . $this->fileName . '"',
112
+ 'Content-Length' => strlen($output),
113
+ ]);
114
}
115
116
/**
0 commit comments