How to force open the “Save As…” popup open at text link click for PDF in HTML?

Spread the love

Sometimes, we want to force open the "Save As…" popup open at text link click for PDF in HTML.

In this article, we’ll look at how to force open the "Save As…" popup open at text link click for PDF in HTML.

How to force open the "Save As…" popup open at text link click for PDF in HTML?

To force open the "Save As…" popup open at text link click for PDF in HTML, we add the download attribute.

For instance, we write

<a href="path/to/file" download>Click here to download</a>

to add the download attribute so that the save file dialog is open when we click on the link.

Conclusion

To force open the "Save As…" popup open at text link click for PDF in HTML, we add the download attribute.

Leave a Reply

Your email address will not be published.