miniprogram-bluetoothprinter icon indicating copy to clipboard operation
miniprogram-bluetoothprinter copied to clipboard

增加了打印二维码功能

Open zengholiday opened this issue 5 years ago • 2 comments

我在楼主开源的项目上,根据自己的需求增加了打印二维码的功能! 在printerjobs.js 加入代码。 printerJobs.prototype.qrcode = function (content = '') { this._enqueue([0x1b, 0x5a, 0x01, 0x03, 0x08, 0x09, 0x00]); this.text(content); return this; }; 然后在输出打印内容出追加.qrcode('123456789')方法就可以打印出二维码了。扫出来的结果是:123456789.可支持英文字符,但我的项目需求只做了九个字节的打印。 我的打印机的是### ESP的指令。

zengholiday avatar Apr 22 '19 03:04 zengholiday

我打出来还是文字,这是为什么呢?

jeiry avatar May 15 '19 02:05 jeiry

@zengholiday 打印出文字123456789,太坑了你!

WangZhenHao avatar Jun 02 '19 01:06 WangZhenHao