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.
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.
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.
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.