Skip to content Skip to sidebar Skip to footer

How To Open PDF Using The BASE64 Key In The Browser

I have seen a number of references to open the PDF using the base64. Nothing is working for me. I tried using window.open('data:application/pdf;base64,' + base64data); but it's jus

Solution 1:

try this code

let pdfWindow = window.open("")
pdfWindow.document.write("<iframe width='100%' height='100%' src='data:application/pdf;base64, " + encodeURI(base64data) + "'></iframe>")

Post a Comment for "How To Open PDF Using The BASE64 Key In The Browser"