0

i am developing a site where the admin will publish pdf file and the file will be loaded in a html page. i use iframe to do so and it works fine on localhost but when i uploaded in to remote server it force me to download the pdf file.here is my code

<iframe src="<?php echo base_url();?>uploads/2.pdf" width="950px" height="800px" >

and here is the link for the page.please suggest me to fix this problem.

Rahat Islam Khan
  • 125
  • 1
  • 6
  • 25
  • 2
    iframes are a bad idea almost always. in addition i visited the site and it displays as i think you wanted it to. the behaviour sounds browser based –  Jun 22 '13 at 04:44
  • 1
    Well I am seeing it inline... might be a security policy of your browser. Using FF 21. Also the client must have a plugin for allowing him to view it inline, in Windows migth be Adobe reader, I am using Firefox's default. – JorgeeFG Jun 22 '13 at 04:46
  • multiple better options: http://stackoverflow.com/questions/291813/recommended-way-to-embed-pdf-in-html –  Jun 22 '13 at 04:48

1 Answers1

0

you can use

<iframe scrolling="yes" frameborder="0" src="<?php echo base_url('uploads/2.pdf');?>" width="950px" height="800px" >
Nisarg
  • 3,024
  • 5
  • 32
  • 54
  • without doing anything your link is works fine..So i think may be it up to browser dependent problem. – Nisarg Jun 22 '13 at 05:39