42 users online (0 members and 42 guests)  


  Results 1 to 5 of 5

Related

  1. Code to allow download of MS word file    Forum: HTML Forum
    Replies: 3
  2. html download code - how to    Forum: HTML Forum
    Replies: 0
  3. Ignore code and link greeting note code    Forum: HTML Forum
    Replies: 3
  4. download link    Forum: HTML Forum
    Replies: 4
  5. Code for a file download    Forum: HTML Forum
    Replies: 8
  1. #1
    cajones's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2004
    Posts
    2

    Question What's the HTML code to download a pdf from a link

    Hi all -

    I'm new to this and I've been searching the web over and I'm under a deadline. I was wondering if there is just a simple line of code someone could give me that creates the dialog box for downloads (pdf's) when you click on a link.

    Thanks so much!

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Nothing simple. You can play around with Content-type headers but at the end of the day they are pretty unreliable.

    I have always found a few lines of text instructing the user to right-click the link and choose 'Save Target As...' works fine.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    caseybarsness's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2008
    Posts
    2

    Re: What's the HTML code to download a pdf from a link

    yes thare is! it is.

    <a href="file.pdf">file</a>

    that sholud work!

  4. #4
    Dorothy Dean's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2011
    Location
    Milwaukee WI
    Posts
    2

    Re: What's the HTML code to download a pdf from a link

    I am looking for the same code and the last reply doesn't do it. Nice and slick though.

  5. #5
    caseybarsness's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2008
    Posts
    2

    Post Re: What's the HTML code to download a pdf from a link

    Try this.
    http://webdesign.about.com/od/php/ht/force_download.htm

    This will only work with PHP though.



Tags for this Thread