@@ 153-161 (lines=9) @@ | ||
150 | * |
|
151 | * @return \Illuminate\Http\Response |
|
152 | */ |
|
153 | public function stream($filename = 'document.pdf') |
|
154 | { |
|
155 | $output = $this->output(); |
|
156 | ||
157 | return new Response($output, 200, [ |
|
158 | 'Content-Type' => 'application/pdf', |
|
159 | 'Content-Disposition' => 'inline; filename="' . $filename . '"', |
|
160 | ]); |
|
161 | } |
|
162 | ||
163 | /** |
|
164 | * Output the PDF as a string. |
|
@@ 239-247 (lines=9) @@ | ||
236 | * |
|
237 | * @return \Illuminate\Http\Response |
|
238 | */ |
|
239 | public function download($filename = 'document.pdf') |
|
240 | { |
|
241 | $output = $this->output(); |
|
242 | ||
243 | return new Response($output, 200, [ |
|
244 | 'Content-Type' => 'application/pdf', |
|
245 | 'Content-Disposition' => 'attachment; filename="' . $filename . '"', |
|
246 | ]); |
|
247 | } |
|
248 | ||
249 | /** |
|
250 | * Save the PDF to a file. |