How to send a file directly to the printer without using window.print() in php/javascript

10,589

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!

Share:
10,589
Yadhu Phinix
Author by

Yadhu Phinix

Updated on June 05, 2022

Comments

  • Yadhu Phinix
    Yadhu Phinix about 2 years

    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

  • Yadhu Phinix
    Yadhu Phinix over 8 years
    Thanks for your support sir. But i need to implement above feature in PHP
  • Dave Amit
    Dave Amit over 8 years
    Then I'll wish you luck my friend! I am 100% sure pure html and js won't cut it. You'll need to add some native component. You can write a browser add-on if its not a public site. Anyways! Best of luck my friend.
  • Vinoth Kumar
    Vinoth Kumar over 3 years
    If any success on this achieve in php means please share the code, I'm looking for this code now. Please help anyone.