Is there a way I can download a pdf file from a URL without it opening in a new browser tab? I tried using the window.open() method but it didn't work as expected.
downloadPDFFile() {
window.open('https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf', 'Download');
}