Announcement

Collapse
No announcement yet.

pdf auto download quandry....

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    pdf auto download quandry....

    The scenario:

    User clicks a link in the browser, which is a generated link provided by a third party (ie - I have no access to their systems, etc).

    This link is to a pdf file.

    When clicked, the pdf is downloaded to the default download directory set for the browser.
    - No user interaction occurs beyond the initial click.
    - It appears they have their server set to force a download (I have found at least two ways of doing this - content-dsposition header OR octet-stream mime type)

    Is there anyway that I can
    - intercept the download and write the file to my chosen directory (ie - mivadata)
    - use javascript or HTML 5 to change the behaviour and/or display the doc?
    - Grab the pdf from the users download location and move it to the server?
    - use some kind of Javascript or jQuery plugin to display the pdf?

    Anything else?
    FYI - using iframe to display this file does not work, neither does embed or object.
    The file is downloaded regardless, and never displayed.

    Desired outcome: display the pdf to the user so they can decide what to do.




    William Gilligan - Orange Marmalade, Inc.
    www.OrangeMarmaladeinc.com

    #2
    Originally posted by wmgilligan View Post

    Is there anyway that I can
    - intercept the download and write the file to my chosen directory (ie - mivadata)
    - use javascript or HTML 5 to change the behaviour and/or display the doc?
    - Grab the pdf from the users download location and move it to the server?
    - use some kind of Javascript or jQuery plugin to display the pdf?
    - no
    - if user does not have PDF reader installed, you'd have to implement the entire PDF parser on the server side to display it as HTML. Like... google docs etc. Alternative is to use pre-made script/library to do so. This is quite a difficult task.
    - no
    - see #2 above

    Comment


      #3
      We've researched this as well, and with all the variances in browser settings (since you can control the server ones) there is no way of insuring what happens when a link to a PDF is clicked. In one case, we had to create a 'back up' "click here to email the pdf" since some users where unable to use the link. (We believe, in these cases--about 3-4% of the time--the browser downloaded the file to the default download directory but the user had no idea that this occurred or where the default directory was--thanks Microsoft.)
      Bruce Golub
      Phosphor Media - "Your Success is our Business"

      Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
      phosphormedia.com

      Comment

      Working...
      X