views:

26

answers:

1

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.

+1  A: 

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.

Byron Whitlock