window.print() works on urls except one

丶灬走出姿态 提交于 2019-12-24 09:24:45

问题


What is the difference between these links(iframe src)? window.print() works on

var myWindow=window.open('','','fullscreen=yes');
myWindow.document.write("<iframe src=\"http://stackoverflow.com/questions/11447382/window-print-does-not-take-the-current-url\" width=\"100%\" height=\"100%\"></iframe>");
myWindow.document.write('<iframe src="' + url + '" width="100%" height="100%"></iframe>');myWindow.document.close();                            
myWindow.focus();
myWindow.print();

But not works on

myWindow.document.write("<iframe src=\"http://localhost:8080/hiringsteps/docs/Keneth _1340800082258/Keneth _resume_1340800082258.pdf\" width=\"100%\" height=\"100%\"></iframe>");

回答1:


The file is PDF file, not HTML one.



来源:https://stackoverflow.com/questions/11448910/window-print-works-on-urls-except-one

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!