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

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

Share Improve this question asked Mar 2, 2016 at 4:27 Yadhu PhinixYadhu Phinix 571 gold badge1 silver badge7 bronze badges 1
  • 2 Could you give us one solid reason why you dont want to do that ? – rahul Commented Mar 2, 2016 at 4:35
Add a ment  | 

2 Answers 2

Reset to default 2

Thats 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 windowprint() in phpjavascriptStack Overflow