admin管理员组文章数量:1391989
I need to print a pdf file directly without showing print preview. When i am using
window.print() it goes to windows print preview page. But i need to send the file directly to the printer without showing print preview page
I need to print a pdf file directly without showing print preview. When i am using
Share Improve this question asked Mar 2, 2016 at 4:27 Yadhu PhinixYadhu Phinix 571 gold badge1 silver badge7 bronze badges 1window.print() it goes to windows print preview page. But i need to send the file directly to the printer without showing print preview page
- 2 Could you give us one solid reason why you dont want to do that ? – rahul Commented Mar 2, 2016 at 4:35
2 Answers
Reset to default 2Thats not possible with pure javascript and html. You'll need to use silverlight 5 (Signed), flash or qz-print - js wrapper which uses java.
For i.e. specific solution following may work
javascript print without print dialog box
I have personally implemented only silverlight 5 (Signed), I have not my self implemented flash and qz-print.
Hope this helps!
Browsers will not allow that to happen. You can use the below plugin to provide beautiful previews.
https://github./etimbo/jquery-print-preview-plugin
Demo: http://etimbo.github.io/jquery-print-preview-plugin/example/index.html
版权声明:本文标题:How to send a file directly to the printer without using window.print() in phpjavascript - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744602672a2615162.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论