@@ 122-130 (lines=9) @@ | ||
119 | * |
|
120 | * @return \Illuminate\Http\Response |
|
121 | */ |
|
122 | public function stream($filename = 'document.pdf') |
|
123 | { |
|
124 | $output = $this->output(); |
|
125 | ||
126 | return new Response($output, 200, [ |
|
127 | 'Content-Type' => 'application/pdf', |
|
128 | 'Content-Disposition' => 'inline; filename="' . $filename . '"', |
|
129 | ]); |
|
130 | } |
|
131 | ||
132 | /** |
|
133 | * Output the PDF as a string. |
|
@@ 209-217 (lines=9) @@ | ||
206 | * |
|
207 | * @return \Illuminate\Http\Response |
|
208 | */ |
|
209 | public function download($filename = 'document.pdf') |
|
210 | { |
|
211 | $output = $this->output(); |
|
212 | ||
213 | return new Response($output, 200, [ |
|
214 | 'Content-Type' => 'application/pdf', |
|
215 | 'Content-Disposition' => 'attachment; filename="' . $filename . '"', |
|
216 | ]); |
|
217 | } |
|
218 | ||
219 | /** |
|
220 | * Save the PDF to a file. |