Is it possible to have a button/link that will trigger download PDF on click?
I am creating a portfolio, and have one part where u need to download my CV, is it possible, and how if it is?
CodePudding user response:
Yes! It is possible, the first thing to have in mind is where are you going to host the pdf that you are going to download. You can have it as an asset on your webpage or in a storage bucket from any of the major providers then just add the following snippet.
<a href='assets/my_pdf.pdf' download>Download pdf</a>
And you would replace assets/my_pdf.pdf
with the url pointing to your file.
CodePudding user response:
every day method
<a href="https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" target="_blank" rel="noopener noreferrer" ><button>Download CV</button></a>