File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ escpos native plugin for electron
44const iconv = require (' iconv-lite' );
55
66const escpos = require (' node-escpos-addon' );
7- const usblist = escpos .GetUsbDeviceList (' usb ' );
7+ const usblist = escpos .GetUsbDeviceList ();
88const printer = usblist .find (item => item .service === ' usbprint' || item .deviceName === ' USB 打印支持' );
99const content = iconv .encode (" 你好啊\n halo cpp!\\ n\n\n\n\n n\n\n\n\n " , ' GB18030' );
1010escpos .PrintRaw (printer .path , content);
@@ -15,7 +15,7 @@ escpos.PrintRaw(printer.path, content);
1515// lpt printer
1616const iconv = require (' iconv-lite' );
1717const escpos = require (' node-escpos-addon' );
18- const lptList = escpos .GetUsbDeviceList ( ' com/lpt ' );
18+ const lptList = escpos .GetLptDeviceList ( );
1919const printer = lptList [0 ];
2020const content = iconv .encode (" 你好啊\n halo cpp!\\ n\n\n\n\n n\n\n\n\n " , ' GB18030' );
2121escpos .PrintRaw (printer .path , content );
You can’t perform that action at this time.
0 commit comments