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.
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.
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With