Link to home
Start Free TrialLog in
Avatar of dramaqueen
dramaqueen

asked on

Save PDF instead of opening it

Hi, Folks

A friend of mine is wanting to include some PDF documents on his website, but wants to be able to set his HTML so that instead of automatically opening the PDF file in IE the user is given the option to save the document instead.

I know that one could right-click and select "Save target as..." but is there some way of modifying the <a> tag to set this option as the default?

Any help would be appreciated!

Cheers,

Andrew
ASKER CERTIFIED SOLUTION
Avatar of dorward
dorward

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This is not possible because it is a set MIME type.  At least it is once the user has Adobe Acrobat Reader installed.  If the user does not have it installe dthey will be prompted.  But that won't be much use because they won't be able to read the downloaded file.

The ONLY way you are going to get the prompt for a download is to have a file with a non-recognised (can not be rendered by the browser using a plugin) MIME type.  Like ZIP or EXE for example.  You could offer a download link which would point to a zipped copy of the PDF document as well as one that will open in the browser.
Avatar of dramaqueen
dramaqueen

ASKER

That's a pity, but I'll suggest the Zip route to him. Thanks anyway, guys.

A.