dcsimg
www.webdeveloper.com
Results 1 to 6 of 6

Thread: How to make PDF link

  1. #1
    Join Date
    Dec 2013
    Posts
    5

    How to make PDF link

    Hi,

    First I'd like to preface my post by stating I am a total newbie, so my web building skills are pretty weak (but I am working on it).

    I'd like to know how to make a button on a webpage that will open a PDF then allow the reader the option of downloading it. Does anyone have suggestions for links, or tutorials on how to do this?

    Thanks in advance.

  2. #2
    Join Date
    Oct 2013
    Location
    3rd planet from the sun
    Posts
    177
    <a href="pdflink.pdf">Open Me I'm A PDF File</a>

  3. #3
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    2,882
    <a href="pdflink.pdf" target="blank">title of PDF</a>
    STOP using $ prefix on JavaScript variable names...
    Please remember to wrap any code you have in forum tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

  4. #4
    Join Date
    Dec 2013
    Posts
    5
    Thanks!

    That worked prefectly. I noticed that different browsers have different behavior. For example, in Firefox, the PDF opens in a new tab, in Chromium the PDF is by default downloaded, and in Opera I am given the option of either viewing the PDF or downloading. Is there a way to make the behavior uniform/consitent across all browswers, or is this simply the nature of the beast, so to speak?

    Thanks again!

  5. #5
    Join Date
    Oct 2013
    Location
    3rd planet from the sun
    Posts
    177
    Quote Originally Posted by cessanfrancisco View Post
    Thanks!

    That worked prefectly. I noticed that different browsers have different behavior. For example, in Firefox, the PDF opens in a new tab, in Chromium the PDF is by default downloaded, and in Opera I am given the option of either viewing the PDF or downloading. Is there a way to make the behavior uniform/consitent across all browswers, or is this simply the nature of the beast, so to speak?

    Thanks again!
    the user controls how they receive pdf files in their browser setting (that is the way it should be), however if you are stubborn and want to try and override the user's control read this article
    http://www.thingy-ma-jig.co.uk/blog/...df-to-download

  6. #6
    Join Date
    Jan 2014
    Location
    USA
    Posts
    37
    thanks kralcx

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles