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
There's no way to do this with only JavaScript.
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.
Here's a batch file example I've created based on the answer provided by @russenreaktor:
@echo off
start "Chrome" chrome --kiosk --kiosk-printing --url http://www.google.com