Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Empty lightbox when pdf confugered save file in firefox

I am using joomla 2.5 with ROXBOX plugin and using this showing the PDF's in lightbox. I am facing problem when user configured Firefox auto download PDF files.

When Firefox configured as save PDF instead of open it in browser the light box stays blank and file started download. As we can not have control on browser, is there any way show any message when Firefox auto download for PDF is enabled?

Please Help!!

like image 258
Piyush Avatar asked Jan 14 '15 04:01

Piyush


1 Answers

I assume you want the PDF to display in the browser, rather than forcing a download. If that is the case, try setting the Content-Disposition header with a value of inline. and 'Content-type to application/pdf.

 header('Content-type: application/pdf');
 header('Content-Disposition: inline; filename="the.pdf"');

You can use PHP to set header as shown above.

like image 165
Techie Avatar answered Oct 19 '22 08:10

Techie