Hello,
I would recommend that getPdf.php stores the PDF on your server and returns an URL instead of binary data. You can then call
window.open(data.urlPdf);
It should be possible to render the PDF binary data using the
data URI scheme. However this is not portable across browsers and has several
potential disadvantages.
window.open("data:application/pdf," + escape(data.dataPdf));