i've Just copy the qz-tray ESC/POS qr code program. qz-tray esc/pos qrcode
printer works perfectly and connection also done successfully.
But qr code is not generated. printer print Like this...
1P0https://qz.io 1A11C 1E0
printer print this single line only. how to solve this?
var config = qz.configs.create("POS-80", { encoding: 'ISO-8859-1' });
// The QR data var qr = 'https://qz.io'; // The dot size of the QR code var dots = '\x09'; // Some proprietary size calculation var qrLength = qr.length + 3; var size1 = String.fromCharCode(qrLength % 256); var size0 = String.fromCharCode(Math.floor(qrLength / 256)); var data = [ // <!-- BEGIN QR DATA --> '\x1D' + '\x28' + '\x6B' + '\x04' + '\x00' + '\x31' + '\x41' + '\x32' + '\x00', // <Function 165> select the model (model 2 is widely supported) '\x1D' + '\x28' + '\x6B' + '\x03' + '\x00' + '\x31' + '\x43' + dots, // <Function 167> set the size of the module '\x1D' + '\x28' + '\x6B' + '\x03' + '\x00' + '\x31' + '\x45' + '\x30', // <Function 169> select level of error correction (48,49,50,51) printer-dependent '\x1D' + '\x28' + '\x6B' + size1 + size0 + '\x31' + '\x50' + '\x30' + qr, // <Function 080> send your data (testing 123) to the image storage area in the printer '\x1D' + '\x28' + '\x6B' + '\x03' + '\x00' + '\x31' + '\x51' +'\x30', // <Function 081> print the symbol data in the symbol storage area '\x1D' + '\x28' + '\x6B' + '\x03' + '\x00' + '\x31' + '\x52' +'\x30', // <Function 082> Transmit the size information of the symbol data in the symbol storage area // <!-- END QR DATA --> ]; qz.print(config, data).catch(function(e) { console.error(e); });
Asked
Active
Viewed 256 times
2

Bot coder
- 75
- 4
-
1Which make and model is the printer? If Xprinter: If you use the Xprinter "XPrinter Receipt Printer Test Tool for Windows", does `Advanced > Print 2D Barcode` button work for this printer? https://www.xprintertech.com/test-tool. If so, it might help to capture the raw data being sent so that we can reverse engineer it. – tresf Aug 03 '22 at 17:50
-
printer model is POS Thermal printer. 80mm – Bot coder Aug 04 '22 at 05:25
-
1Hi, thanks for the information, but this is neither a make nor a model. Do you have the manufacturer information to share? Each hardware is different, so knowing who makes the hardware is important to identifying the devices capabilities. – tresf Aug 04 '22 at 15:29
-
Hi,sorry,i'll give the information about it. model: 260IV SU CLASSIC, name: KVPOS thermal printer, command:ESCPOS, – Bot coder Aug 05 '22 at 10:29
-
[printer Details pdf](https://5.imimg.com/data5/SELLER/Doc/2021/2/MN/OI/SZ/17791178/kvpos-therma-printer.pdf) – Bot coder Aug 05 '22 at 10:30
-
1Thank you. I've emailed http://www.kvbusinesssolutions.in for technical help with this. I've asked them for a QR code printing example so that we can adapt this example to be used by QZ Tray. – tresf Aug 05 '22 at 17:12
-
Thank you for taking the trouble to help me. @tresf – Bot coder Aug 06 '22 at 06:02
-
hi, @tresf if any response form them. – Bot coder Aug 09 '22 at 13:25
-
No, not yet. :/ – tresf Aug 09 '22 at 14:45
-
If you can obtain another QR code example for ESC/POS that works with your printer, we'd be happy to adopt it to the above example. :) – tresf Aug 09 '22 at 14:48