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

后端 未结 4 1499
广开言路
广开言路 2020-12-13 02:15

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

4条回答
  •  情歌与酒
    2020-12-13 02:52

    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.

提交回复
热议问题