Similar Question:
How can I use jQuery to automatically force a PDF download?
Hello everyone,
I have a PDF document that users need to be able to download. Instead of using an <a>
tag or something similar, I would like to achieve this using Javascript.
I currently have the following code, but it opens in a new window/tab.
window.open(url,'Download');
Is there a way to instruct the browser to display a download dialog box instead of directly showing the PDF file?