How do I show a file from a binary string? to images files, it's possible to do by using atob() and then <img src="data:image/png;base64,... But to a PDF file for example, is there an equivalent? or some way that say to web browser ReadItAs("content-type:application/pdf", binaryPdf); I hope this is clear. Thanks in advance.
Update
I have tried this:
var metatag = document.getElementsByTagName("meta")[0];
metatag.setAttribute("http-equiv", "Content-type");
metatag.setAttribute("content", "application/pdf");
document.body.innerHTML = binaryString;