Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Print from Chrome without the print dialogs? Using Greasemonkey userscript maybe?

We're developing a browser-based warehouse app that needs to print labels and invoices regularly. We want to be able to print to the local printer without clicking through the the usual browser print dialogs. Is this possible? Possibly using a greasemonkey userscript? We don't want to have to setup a whole CUPS printer network and deal with all that, but warehouse pickers having to click through a print dialog 1000 times a day isn't an option.

We're printing PDFs, not sure if that matters. If we could do this another way using HTML5 or something else I'm open to course changes or other ideas here.

like image 383
Eric Hanson Avatar asked Jun 16 '10 20:06

Eric Hanson


People also ask

How do I set up Auto Print in Chrome?

To enable auto-printing: Step 1: Right-click on the Google Chrome icon from your POS machine Desktop. Step 2: Click Properties. Step 3: From the Target box, after \chrome.exe", add "(space)--kiosk-printing" and click Apply.


2 Answers

You can do if you start your chrome (v18+) with the --kiosk --kiosk-printing switches.

You can see it from this video https://www.youtube.com/watch?v=1ewep-ZT64E

like image 150
printminion Avatar answered Sep 21 '22 11:09

printminion


You can put a button on the form you are generating, then using embedded javascript in the pdf itself, cause printing to happen silently.

There are various ways to print a document without requiring user interaction. One way is to use the doc object’s print method and set the bSilent attribute to true, as shown in “Printing PDF Documents” on page 79 and in the following example: this.print({bUI: false, bSilent: true, bShrinkToFit: true});

http://partners.adobe.com/public/developer/en/acrobat/sdk/AcroJSGuide.pdf

Take a look at the silent printing section under Print Production.

like image 28
Byron Whitlock Avatar answered Sep 20 '22 11:09

Byron Whitlock