-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QR code not printed #9
Comments
You must make sure if your printer supports the full ESC/POS protocol, and also check if the size of the data you're printing is in an acceptable range by the printer. |
@ingoncalves I got result with barcode but I get that String when I am trying to print QRCode of that respected String.Also I check the features of my Printer It support ESC/POS protocol.Then what is the issue I didn't understand |
@VyankeshH try doing this: import { EscPos } from '@datahex/escpos-xml';
const xml = `
<?xml version="1.0" encoding="UTF-8"?>
<document>
<qrcode ecl="M">{{qrcode}}</qrcode>
</document>
`;
const data = {
qrcode: 'hello qrcode'
};
const buffer = EscPos.getBufferFromTemplate(xml, data);
// send this buffer to the printer Thus, we are going to eliminate other hypotheses of error. Please, report me the result. |
@ingoncalves If I used above code then my Output on printer will be : hello qrcode |
Well, in this case, I think that your printer doesn't support the QR code feature. Unfortunately, there are some models that don't support it. You should check your printer specifications. |
@ingoncalves OK Brother,Actually I checked all specification. It showing for the QRcode supported |
Hmm, it's weird. So, you may use the BufferBuilder or try writing the buffer manually, according to the printer specification. There might be differences in protocol. |
having the same issue, with CITIZEN CT-S310II printer which support QR printing. |
I've tested as well with my printer, EPSON TM-T20II and it support the barcode and Qr Code. |
@shaniqwa Did you get solution for QR Code printing. |
@VyankeshH I have implemented this function with some help from node-thermal-printer
|
@shaniqwa I tried this also still I got Chinese characters on print.My printer name is FUKUN pos80 printer. |
@VyankeshH you have to follow your printer's guide for QR printing and change the commands if needed. each printer is a bit different, this code works for CITIZEN printer. I have downloaded an ugly pdf with all printers commands and followed it, eventually it worked. |
@shaniqwa Can you show me the return data? Is it possible for you now?? |
@shaniqwa Thank you.I got the result. |
@shaniqwa @ingoncalves How could I merge two buffer for printing purpose. |
@VyankeshH I am facing the same problem. Could you help me how you implemented @shaniqwa solution. |
I am also facing the same issue, is there any update |
@VyankeshH I have base64 data is it possible to get qrcode |
Not able to get QR Code using this.
The text was updated successfully, but these errors were encountered: