ohioequities
asked on
Prompt to Save As When Clicking a PDF
I have a webpage with a link to download a pdf file, however when a visitor clicks to download the pdf, it automatically opens it instead of prompting to save it as a file. I have read through some solutions on this site and all of them recommend writing something in asp. The problem is that I have no experiencing writing any code in asp, I only have experiece with HTML. Therefore, I am looking for the easiest solution in order to get my visitors to be able to download the pdf file without having to right click and select save target as. If this can not be done with the <a href command, please explain to me the easiest way to get this done. If asp is the only option could you please supply the necessary code I need to start the asp file. Thanks.
ASKER
The users that will be downloading these pdfs are not advanced users, and I would like to make this as easy as possible for them. Therefore I would like to do some programing on my end so that they do not have to unpack anything.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you dont use Dreamweaver (its the dreamweaver devision)
use this code
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>pdf</title>
</head>
<body>
<a href="test.pdf" target="_blank">TEST</a></ body>
</html>
use this code
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>pdf</title>
</head>
<body>
<a href="test.pdf" target="_blank">TEST</a></
</html>
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you all for your responses. I currently have the code proposed in the last repsonse
a href="file.pdf" onClick="alert('Please right Click and Choose Save Target as to Save this File');return false"> PDF </a>
however, is there any code I can write that will allow the user to download the file by left clicking, not by right clicking?
a href="file.pdf" onClick="alert('Please right Click and Choose Save Target as to Save this File');return false"> PDF </a>
however, is there any code I can write that will allow the user to download the file by left clicking, not by right clicking?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
May be you could try to ask an ASP expert in ASP section:
https://www.experts-exchange.com/Web/Web_Languages/ASP/
Just simply make a new open question and redirect user to this post
https://www.experts-exchange.com/Web/Web_Languages/ASP/
Just simply make a new open question and redirect user to this post
ohioequities thats the best and fast way if you dealing with Client Side Solution.
Sorry, I am talking something not related to the topic.
New user could fill in a form to earn available point:
https://www.experts-exchange.com/survey.jsp?sid=2
New user could fill in a form to earn available point:
https://www.experts-exchange.com/survey.jsp?sid=2
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
the best way is to pack the pdf file with winrar or winzip.
Than you can download it by clicking