0
<iframe src="mydoc.pdf" width="600px" height="800px"></iframe>


<div>
<iframe src="mydoc.pdf" width="600px" height="800px"></iframe>
</div

above code not working if idm installed.

Vaibhav Jain
  • 3,729
  • 3
  • 25
  • 42

2 Answers2

0

Content-Disposition header can be set to attachement or inline

With inline, the browser will try to open the file within the browser.

So if you have a PDF file and Firefox/Adobe Reader, an inline disposition will open the PDF within Firefox, whereas attachment will force it to download.

So make sure to set the Content-Disposition header to inline.

Umang Mehta
  • 1,467
  • 11
  • 16
  • Do accept the answer if that helps you to solve your issue. See how does accepting answer works: http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work – Umang Mehta Sep 03 '13 at 06:15
0

you should try using the object tag like this:

<object data="sample.pdf#toolbar=1&amp;navpanes=0&amp;scrollbar=1&amp;page=1&amp;view=FitH" type="application/pdf" width="100%" height="100%">

This works with native pdf support in Chrome and new FF and also with plugins in IE (like Foxit or Acrobat Reader).

The width and height can be defined with html outside the tag.

YvesR
  • 5,922
  • 6
  • 43
  • 70