johnrp — 2013-02-28T17:46:42-05:00 — #1
I want to let the end user click a button or hyperlink to download a PDF file from the site or open it in the PDF client installed on the user's computer.
Adding a normal hyperlink displays the contents of the PDF in the internet browser and is not suitable for more than a small amount of content.
I would appreciate any suggestions.
ralphm — 2013-02-28T18:20:01-05:00 — #2
Only some browsers do that; others just download it for you. But browsers are a perfectly good tool for viewing PDFs, in my experience anyway, so I'm not sure why you say it's not suitable for a long document to display in a browser.
You can force a PDF to download, but I'm not sure it's a good idea to interfere with normal browser behavior.
jeff_mott — 2013-02-28T18:47:25-05:00 — #3
As an end user, I prefer to view PDFs, even large PDFs, in the browser. Then I can choose to save it somewhere only if I decide to keep it. Ralph's right that you can still force it to always download, I believe with Content-Type: application/octet-stream, but I urge you to not do that.
johnrp — 2013-02-28T19:04:03-05:00 — #4
Many thanks for the responses.
The PDF files have a fair bit of content arranged with bookmarks to give the user an overview of what is there and a way to navigate directly to what they want to view.
In Firefox I was not able to activate the bookmarks and found navigating the content more difficult than in a PDF client.
Also many users will want to save the content to use as an off-line reference.
johnrp — 2013-02-28T19:18:08-05:00 — #5
I have just worked out how to display bookmarks as a treeview in Firefox so this does what I want.
Thanks for the benefit of your experience.
ralphm — 2013-02-28T23:53:35-05:00 — #6
As Jeff said, there's always the option to Save As ... though people don't necessarily know that—always the problem with technology.