Cordova-Plugin-BTPrinter icon indicating copy to clipboard operation
Cordova-Plugin-BTPrinter copied to clipboard

QR Code printing

Open HrvojeRajic opened this issue 4 years ago • 5 comments

Hi, I implemented your plugin within 12 hours. List, Connected, Connect, Disconnect, printText, even image print using base64. Everything works perfect!...except printQRCode. I have two different cheap BT printers. When I try printQRCode function on them, on one of them only printable characters of this command are printed (for example: k1A3k1Ck1E3k1P0http://...), while on the other printer only line feed occurs. Both printers in their docs state that they support QR code printing. I tried with your demo app with my printers and tested printQRCode function, but I am getting same effects, described above.

I can print QR code using base64 Image command (I tried and it works), but it would be better for me to use QR code command.

Do you already have info about this issue with QR code printing?

Thank you very much and best regards!

HrvojeRajic avatar Dec 24 '20 18:12 HrvojeRajic

Hi, the plugin demo app, the printQRCode and printBarcode methods are my additions. The printQRCode function uses commands as shown in the GS ( k <Function 181> reference from EPSON and worked correctly on my brandless, generic BT printer. It could be that your printers use a propietary format of their own. Do you have any documentation about ESC/POS commands for them? Have you tried with the different QR code modes provided by the Demo app?

andreszs avatar Dec 25 '20 00:12 andreszs

Hi, thank you very much for your response and support!

My both two printers are also brandless, generic thermal BT printers. Unfortunately, in poor doc which I got with new one, it only states that it supports QR codes (and there is a small piece of paper with QR code and few barcodes as a proof, I suppose). On this (new) printer I have line feed only without any printable characters. For the old one I don't have any docs. The old one prints out something like:

k1A3k1C3k1E3k1P0http://www.andreszsogon.com/k1Q0

and that's it.

btprint

I tried with model 1, 2 and micro QR. I also changed size and error correction level but I always getting similar text (sometimes I have "...k1C2..." but I think it is due to changing options).

It is also interesting that on new printer I am getting EAN 13 barcode properly, while on old one I am getting just numbers (012345678901).

Best regards and thank you!

HrvojeRajic avatar Dec 29 '20 08:12 HrvojeRajic

I am also facing same issue , did you got any solution?

VamsiTelagathoti avatar Jan 19 '21 06:01 VamsiTelagathoti

Hi, thank you very much for your response and support!

My both two printers are also brandless, generic thermal BT printers. Unfortunately, in poor doc which I got with new one, it only states that it supports QR codes (and there is a small piece of paper with QR code and few barcodes as a proof, I suppose). On this (new) printer I have line feed only without any printable characters. For the old one I don't have any docs. The old one prints out something like:

k1A3k1C3k1E3k1P0http://www.andreszsogon.com/k1Q0

and that's it.

btprint

I tried with model 1, 2 and micro QR. I also changed size and error correction level but I always getting similar text (sometimes I have "...k1C2..." but I think it is due to changing options).

It is also interesting that on new printer I am getting EAN 13 barcode properly, while on old one I am getting just numbers (012345678901).

Best regards and thank you!

same any updates im using woosim wsp-i350

hawk2017 avatar Jun 14 '23 07:06 hawk2017

use https://github.com/soldair/node-qrcode and get the base 64 code and then use BTPrinter.printBase64(function

It really works to print qr.

htut-git avatar Jul 24 '23 08:07 htut-git