I have a link. If it is executed in a browser it triggers PDF-file downloading. I want to get this file in JS from this link and store it to a variable. Is it possible?
Yes, you can do it. For example, you can store the pdf into the blob (file-like object). https://developer.mozilla.org/en-US/docs/Web/API/Blob
const url = 'your link to the PDF'
let pdf;
fetch(url)
.then(response => response.blob())
.then(blob => {
pdf = blob
})