I am using the base64 trait of pdf.js and have designed a php file (byte_to_pdf --> please remove .txt and unzip the file).
When this file is called, it works perfectly. (Please note that I am using IE 9 and IE 11 [it is a must for me])
However, when i call this file through ajax call, it doesn't display. here's my ajax call:
function openPDF_frombyte(byte_string)
{
$.ajax({
type: "POST",
url: "../ALL/byte_to_pdf.php",
data: { byte_string: byte_string},
success: function(data){
var w = window.open();
var newIframe = w.document.createElement('iframe');
newIframe.width = '80%';newIframe.height = '80%';
w.document.body.appendChild(newIframe);
newIframe.contentWindow.document.open('text/html');
newIframe.contentWindow.contents = data;
newIframe.src = 'javascript:window["contents"]';
newIframe.window.PDFViewerApplication;
}
});
}
Can you please tell me what's the problem. I tried it for testing in chrome and it worked!! but I am obliged to use IE
bytetopdf.zip.txt
I am using the base64 trait of pdf.js and have designed a php file (byte_to_pdf --> please remove .txt and unzip the file). When this file is called, it works perfectly. (Please note that I am using IE 9 and IE 11 [it is a must for me])
However, when i call this file through ajax call, it doesn't display. here's my ajax call:
Can you please tell me what's the problem. I tried it for testing in chrome and it worked!! but I am obliged to use IE
@yurydelendik