Download pdf instead of opening in a new window

Discussion in 'Coding Help' started by WhitePhantom, Mar 21, 2011.

  1. WhitePhantom

    WhitePhantom New Member


    I'm putting a link to a pdf file on a client's website, but when I click the link it opens the pdf in the browser window, instead of giving me the option of downloading/saving it, and opening it with Adobe Reader on my own machine.

    What do I need to do to stop it opening in the browser window?

  2. php.allstar

    php.allstar New Member

    I think there's a setting in adobe reader preferences for disabling open in browser. Have a look and let me know

    Sent from my Nexus S using Tapatalk
  3. WhitePhantom

    WhitePhantom New Member

    Thanks for your reply. I did that but it's still opening it in the browser.

    I'm using Adobe Reader X. I launched it from my Start menu, went Edit -> Preferences, and in the 'Internet' category I unchecked the 'Display PDF in Browser' box. I also unchecked 'Display in Read Mode by Default', and I rebooted after changing the settings.
  4. Kieran

    Kieran Guest

    I think that you can set it using Php in the MIME type and coding some Php around it. Sorry for being super duper lazy but I think there are some articles out there on how to do this.
  5. WhitePhantom

    WhitePhantom New Member

  6. php.allstar

    php.allstar New Member

    Oh, I see, if you want to di it in PHP, try the first example on this link:

    PHP: readfile - Manual

    *sorry didn't see your last post...
  7. WhitePhantom

    WhitePhantom New Member

    Thanks php.allstar, that solution looks good too.

    I don't really mind what I use to make it present the user with the download option instead of just automatically opening it in the browser, just as long as it does what I want.

    It's going to be publicly available to all who visit the website, so I want to make sure they're going to be presented with a Download File option.

Share This Page