With this way we can open the pdf in a new tab. i found this in somewhere, but i don't remember exactly where
var objbuilder = '';
objbuilder += ('<object width="100%" height="100%"
data="data:application/pdf;base64,');
objbuilder += (myBase64string);
objbuilder += ('" type="application/pdf" class="internal">');
objbuilder += ('<embed src="data:application/pdf;base64,');
objbuilder += (myBase64string);
objbuilder += ('" type="application/pdf" />');
objbuilder += ('</object>');
var win = window.open("#","_blank");
var title = "my tab title";
win.document.write('<html><title>'+ title +'</title><body style="margin-top:
0px; margin-left: 0px; margin-right: 0px; margin-bottom: 0px;">');
win.document.write(objbuilder);
win.document.write('</body></html>');
layer = jQuery(win.document);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…