0

I'm pretty sure this isn't possible but thought I'd check with you guys.

I've just had a bizarre query from a client who wants to know if it's possible to give the user the option to either download a pdf or open it in their browser.

They have a thumbnail for the PDF. Single click to open it in the browser or double click to download it. I know I can catch the single or double click with jQuery. I just want to know if it's possible to force the behaviour of the link.

Thanks

Fraser
  • 14,036
  • 22
  • 73
  • 118

1 Answers1

2

This is possible, if for example you are using PHP you can create 2 methods, once will be a simple direct link to the pdf file (if a customer has adobe reader then it will open the pdf in the browser otherwise it will force a download), the other method would always force a download.

You can find a PHP force file download example here: How to force download of a file?

Community
  • 1
  • 1
Alex
  • 1,630
  • 1
  • 20
  • 31