pdf open instead of download

Discussion in 'Apache' started by jacka, Dec 21, 2007.

  1. #1
    Hi

    I wish for a visitor to our site to view the pdf file instead of downloading it, can you please help.
    I have seen this question answered the other way round, but haven't found it this way round.

    We have two completely separate sites, same pdf file, using same browser,only one gets downloaded as pdf the other opens for viewing automatically. I wish for the 2nd site also the file to be viewed rather than downloaded.

    The Second site is located in VPS2.0 using Plesk cantrol panel, (which I am not familiar at all), my guess is some changes must be made to the server.

    Any help will be much appreciated.
    thanks.
    jacka
     
    jacka, Dec 21, 2007 IP
  2. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #2
    A link directly to a PDF on both servers so the HTTP headers being sent can be looked at would be nice.
    Having just the headers posted here instead would be even nicer.

    One server could be sending a generic application/octet-stream content-type instead of application/pdf.
    There could be a content-disposition header forcing download on one server. This practice seems to be getting more popular to discourage content framers. I don't know if you purchased this site or developed it inhouse.
     
    joebert, Dec 21, 2007 IP
  3. jacka

    jacka Peon

    Messages:
    165
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi
    Thanks for your reply.

    An example of the pdf page that I wish to display in another window, which gets downloaded instead is:
    http://hpcgearsinternational.com/newpdf/anti_backlash_gears_2.5mod.pdf

    Just a reminder: in windows it gets opened but in mac osx it gets downloaded, which I wish to avoid, and display the pdf instead.

    Any help will be much appreciated.
    jacka
     
    jacka, Jan 2, 2008 IP
  4. hostingcoupon

    hostingcoupon Peon

    Messages:
    447
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It may depend on the browser environment, little you can do on the server side.
     
    hostingcoupon, Jan 3, 2008 IP
  5. jacka

    jacka Peon

    Messages:
    165
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hi

    I am using the same browser though, safari, mascosx.

    Also I am using the same piece of coding. In in one server it downloads the pdf and in other it displays it.

    However when I use the explorer, in pc, The pdf gets opened.

    Just to sum up, windows explorer opens pdfs in both server but safari only downloads it in new apache sever.

    i wish to make it open the pdf instead.
    Any ideas plz?
    jacka:confused:
     
    jacka, Jan 3, 2008 IP