I am really having a hard time opening up certain .pdf files within an iframe HTML element. I can open some .pdf files in this iframe, but not all of them. The ones that I cannot open were created by the Crystal Reports engine in Visual Studio 2010.
My source is simple and looks like the following:
<iframe src= "c:\jnk\EULA.pdf">
Is there any characteristic of a .pdf file that could prevent it from being displayed in an iframe? I am using IE8, but get the same results in FF. I also can perfectly display this .pdf file when it is not in an iframe.
IFrame isn't correct solution. You can use other solutions :
<embed src="file:///C:\jnk\EULA.pdf" width="500" height="375">
2 . Download this library and use it.
I hope that I helped.
Remember that when we use local file, we should write in prefix
Sorry for my English
Based on a comment of yours, it sounds like your issue is one of permissions, unrelated to PDFs.
If I were you, I'd make sure that I can access the PDFs in my browser outside of any HTML. If that fails, you know you have a problem.