electron-thermal-printer

0.0.5 • Public • Published

热敏打印 Thermal print for electron

使用electron的print功能进行热敏打印,目前支持58mm,需要electron版本 大于1.8.1

requires electron > 1.8.1

Supported OS

currently windows only

Notice

安装打印机windows自带的驱动

Please use windows printer driver. Which you can see it at control panel.

Delele zadig driver if you used them

控制面板-设备管理器-在各种网关硬件usb的界面-删除驱动

If you installed zadig driver you must uninstall them.

Usage 1

in main process:

require('electron-thermal-printer') //in any file, once

in renderer process:

const ipcRenderer = require('electron').ipcRenderer; ipcRenderer.send('print-58m', {options}); ipcRenderer.once('print-58m-reply',function(event, result) { // result: boolean });

Usage 2

in renderer process:

require('electron').remote.require('electron-thermal-printer').print58m({options}); // returns a promise

printing options

See demo folder, index.html, line 46

Contact

Email: 272992860@qq.com

Dependents (0)

Package Sidebar

Install

npm i electron-thermal-printer

Weekly Downloads

0

Version

0.0.5

License

ISC

Last publish

Collaborators

  • goodman3
  • myq1991