Reputation: 1
I currently using barryvdh/laravel-dompdf for printing pdf. But whenever I click on the print button it always downloads the file instead of opening a browser tab. How I can fix this ??? I've seen others post but I didn't get the right solution too.
$customer = Customer::findOrFail($id);
$pdf = PDF::loadView('pdf.info-print', $customer);
return $pdf->stream('info.pdf');
Upvotes: 0
Views: 2988
Reputation: 367
may try this
return $pdf->stream('info.pdf', array("Attachment" => false));
Upvotes: 2