This is what I have now:
$file = $generation->pdfStoragePath().'/'.$downloaded_filename;
$headers = [
'Content-type' => 'application/pdf',
'Content-Disposition' => 'inline; filename="' . $downloaded_filename . '"',
'Content-Transfer-Encoding' => 'binary',
'Accept-Ranges' => 'bytes',
];
return Response::download($file, $downloaded_filename, $headers);
The problem is, every time I try to open the link to get the file, the file downloads instead of showing in the browser window. As you can see, I tried to set the headers following this blog: http://yogeshchaugule.com/blog/2013/how-display-pdf-browser-php but without success. Any ideas, where's the problem?