I'm currently trying to display a bootstrap modal in which I want to include a PDF file with the "object" html tag. Problem is that nothing seems to display.
I've created a jsFiddle (http://jsfiddle.net/mV6jJ/3/).
So you will find a basic modal (exactly same code from bootstrap for a basic modal showing after a click on a button) and in the modal-body you will find :
<object type="application/pdf" data="http://www.inkwelleditorial.com/pdfSample.pdf" width="500" height="500">this is not working as expected</object>
So when I add this code alone (so not inside a bootstrap modal) it's working as expected. It display the pdf in the browser's default pdf viewer. But when I try to implement the pdf inside of the bootstrap modal, nothing seems to appear.
If you have any idea it will really helps me, many hours searching and I've only seen solutions with tag (which I don't want to use).
Thank you and best regards
I have found that bootstrap include a css property that affect to pdf viewing in a modal window.
Change this:
to:
If this property is changed everything works properly.
You can see in action:
http://jsfiddle.net/mV6jJ/20/
Prevent download manager: Again, if you have Internet Download Manager or any other download manager that catches pdf automatically try to prevent it from auto catch pdf link.
Also checkout
PDFObject
JS, it should be interestingEDIT
Please try iframe instead object type pdf
http://jsfiddle.net/mV6jJ/9/
Finally found the solution :) It was my browser pdf reader that wasn't configured well. Firefox was using the Adobe Reader for displaying pdf. I replaced that by pdf.js (the pdf reader of Firefox) and now everything seems to work well :) Thank you very much for your time and help :)