Require PDF To Always Be Saved Instead of Opened In Browser Window...

Discussion in 'Programming' started by webinv, Apr 27, 2006.

  1. #1
    Greetings,

    I've been trying to find this solution. I know it is out there, but I haven't been able to find it.

    I need to require all pdf files to be prompted to SAVE AS instead of being able to open in the browser window.

    I believe this is an .htaccess fix, but can't find it.

    Thanks,

    Jon
     
    webinv, Apr 27, 2006 IP
  2. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can force a download by messing with the headers that it sends. [search=google]force download php header[/search]
     
    exam, Apr 27, 2006 IP
    webinv likes this.
  3. webinv

    webinv Peon

    Messages:
    113
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for your response. This actually help me find the answer I needed.

    I found it here

    http://hyacynth.info/content/view/17/9/

    6)Adding MIME Types (FileInfo)
    AddType application/x-shockwave-flash swf
    AddType application/octet-stream pdf (to force download)
     
    webinv, Apr 27, 2006 IP
    exam likes this.
  4. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Good job, glad you found what you needed.
     
    exam, Apr 27, 2006 IP