Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to skip browser default print preview and print content directly to printer in jquery/javascript?

As, we know in C# windows form application we can print content directly to print without any preview. I want to print content in jQuery/JavaScript when user click a button, browser does not show any print preview and content printed to printer.

I am also having the same issue.

like image 387
Mujassir Nasir Avatar asked Dec 24 '14 07:12

Mujassir Nasir


1 Answers

After hours of research I found following solutions to resolve my issue.

Maybe you could setup your printers with Google Clound Print then use the cloud printing API to silently submit jobs to them. It looks like you can specify the printer id when you submit the job. You might need to use something like html2canvas to rasterize the webpage.

Found here Select a printer and silently print

In chrome (v18+) we have the --kiosk --kiosk-printing switches. One can print automatically to default printer without print confirmation.

You can see it from this video http://www.youtube.com/watch?v=D6UHjuvI7IE

Found here Google Chrome Extension: Print the page silently

like image 105
Mujassir Nasir Avatar answered Sep 21 '22 15:09

Mujassir Nasir