这是我打印iframe的代码
<Iframe src="data:application/pdf;base64,JVBERi0x...."></Iframe>
//javascript Code
var frame = document.getElementById('printFrame');
if (!frame) {
alert("Error: Can't find printing frame.");
return;
}
frame = frame.contentWindow;
frame.focus();
frame.print();
错误讯息:
请求访问的帧具有&#34; http&#34;的协议,被访问的帧具有&#34;数据&#34;的协议。协议必须匹配