Hey I have an issue where I'm trying to create a button where it automatically downloads a pdf. I saw many examples where it does works by a filepath (root/folder/pdf) but not by url.
Trying this because I'm using wordpress guttenberg and want less technical people to be able to upload a pdf url.
pdf url - https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf
<a class="btn" href="<?php echo the_field('pdf_url') ?>" download ><span>Download PDF</span></a>
Outputs as
<a class="btn" href="https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" download><span>Download PDF</span></a>