ableier Posted May 19, 2015 Share Posted May 19, 2015 (edited) Hi All, Seeing if there is a way to view pdf's (like delivery receipt, etc) in the browser instead of automatically downloading them. For our operation it is much easier to print from the browser instead of downloading each slip, opening it and then printing. Any help or insight would be greatly appreciated. Thank you. Edited July 24, 2015 by ableier (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted May 19, 2015 Share Posted May 19, 2015 what browser and operating system are you using? Also what PS version? I find that some browsers handle this differently, and would also require that you have the appropriate browser plugin installed to view the PDF "in browser" Link to comment Share on other sites More sharing options...
ableier Posted May 19, 2015 Author Share Posted May 19, 2015 I've tried it in Safari, Chrome and Firefox. All only download with no option to view in browser. I have tried other documents that work fine in the browser window. I use Yosemite for Mac. PS version 1.6.0.14. From my research online it seems that it is coded that way in PS. I have no idea what code. Any help is appreciated. Thank you. Link to comment Share on other sites More sharing options...
bellini13 Posted May 20, 2015 Share Posted May 20, 2015 This requires a change to the AdminPdfController.php located in \controllers\admin. You will find a function generatePDF at the bottom public function generatePDF($object, $template) { $pdf = new PDF($object, $template, Context::getContext()->smarty); $pdf->render(); } To get the invoice to display "inline", you need to change this function From $pdf->render(); TO $pdf->render('I'); 4 Link to comment Share on other sites More sharing options...
ableier Posted May 20, 2015 Author Share Posted May 20, 2015 Perfect. Thank you for all of your help. Link to comment Share on other sites More sharing options...
Recommended Posts