
0
Linking to a Downloadable PDF
Hi Guys,
I am currently trying to add a link into an email so that customers can download a PDF.
At the moment I am hosting the PDF on dropbox, but I will be moving it to Amazon S3 when I get the login details from my colleague.
My question - am I able to have my download button as an image and still have it link to download?
Here is the snippet of my code:
<table border="0" cellspacing="0" cellpadding="0" width="100%" bgcolor="#ffffff">
<tr>
<td align="left" valign="top" style="padding: 15px 0px 10px 0px;">
<a href="https://www.dropbox.com/s/jjs5ohs5vz5xyxk/Gift%20Subscription%20Card%20and%20Instructions.pdf?dl=0" target="_blank">
<img src="https://dl.dropboxusercontent.com/s/o51veijuvd0ou8y/button.jpg" class="button" alt="Download" style="font-family: Arial, Helvetica, sans-serif; color: #0094d7; text-align:center; font-size: 30px;">
When I click on the button it takes me to the dropbox site rather than prompting a download.
How do I get it to prompt this download? Is the problem because of where I am hosting the PDF, the fact that the PDF isn't zipped, or is there a problem with my code?
Thanks a lot in advance.
Tom Piggott
Hello Tom,
Your HTML code is correct. The issue is more about how Dropbox handles file sharing. By default, it'll redirect users to a landing page with their PDF viewer. You can overwrite this and force web download by adding ?raw=1 to your current download URL so that it becomes:
https://www.dropbox.com/s/jjs5ohs5vz5xyxk/Gift Subscription Card and Instructions.pdf?raw=1
This is documented on the Dropbox Help Center: https://www.dropbox.com/en/help/201
Ahmad,
You are a genius. Thanks so much for getting back to me so quickly.
This has solved it and it now works like a dream!
Thanks!
Tom
You may try to download pdf visit on this website at http://pdf-to-jpg-convert.en.softonic.com here you find the best.
As a rule, I would also suggest removing the spaces in the file name. Generally, they get replaced with %20 but I have found that sometimes this breaks the link .... I would go with - or _ or leaving them out instead, eg:
Gift_Subscription_Card_and_Instructions.pdf
or
GiftSubscriptionCardandInstructions.pdf