I am trying to get my customers to auto download a PDF when they click on a link on my product page. Each product will have a different link, so I set up a metafield URL for the PDF and embedded the url to the product page (see image). Right now, the link just opens to a new tab. Is there a way to HTML code it so it auto downloads the PDF when you click on it?
Just replace “your-pdf-url.pdf” with the URL of your PDF file and “Link text” with the text you want to use for the link.
This should force the browser to download the PDF instead of opening it in a new tab. However, please note that this behavior may vary depending on the browser and device being used by your customers.
Yes I tried adding the download attribute, but it does not auto download, it just opens into a new tab. See pic. Is it possible that it’s a metafield that’s causing it to open to a new tab? Trying to see if there’s a work-around for this.