How to open PDF Blob using browser's PDF viewer rather than downloading?
You can use window.open()
on the result of window.URL.createObjectURL(blob)
to open the PDF in a new window instead of downloading it. For example:
var blob = new Blob([pdfBuffer], {type: 'application/pdf'});
var blobURL = URL.createObjectURL(blob);
window.open(blobURL);