?dl=1 to it. <a download> link and trigger it with JavaScript from the button click.To allow a button on your Webflow site to download a PDF file directly (without opening a new tab or redirecting), you’ll need to configure both your file link and the button properly.
J or click the paperclip icon).
?dl=1 query parameter (e.g., https://cdn.prod.website-files.com/yourfilename.pdf?dl=1).download attribute, so this ?dl=1 trick works for hosted files in many cases — but it’s not guaranteed for all browsers.
For more reliable forced downloads, especially if the above doesn’t trigger a download in all browsers:
download attribute like:
<a href="YOURPDFURL" download id="custom-download-btn"></a>
my-button and add this script in Page Settings > Before </body> tag:
document.getElementById('my-button').addEventListener('click', function() { document.getElementById('custom-download-btn').click(); });
This makes the Webflow button trigger the invisible download link, mimicking the download attribute effect.
To create a download button for a PDF in Webflow:
?dl=1 at the end.
This avoids opening new tabs and starts the download directly for most users.