lsongdev / node-escpos

🖨️ ESC/POS Printer driver for Node.js
https://npmjs.org/escpos
Other
1.34k stars 419 forks source link

Barcodes are not printed (only works with EAN8) #31

Closed jorgemaciaspina closed 7 years ago

jorgemaciaspina commented 7 years ago

Hi, I'm having problems when printing barcodes. I just changed the barcode type on the example code, but no luck. My printer is an EPSON TM-T20II and according to the documentation it supports all the barcode formats available in your code. I hope you can help me find out what's happening.

device.open(function(){
  printer
  .font('a')
  .align('ct')
  .style('bu')
  .size(1, 1)
  .text('The quick brown fox jumps over the lazy dog')
  .barcode('B012ABCDabcd','CODE128')
  .cut()
});
lsongdev commented 7 years ago

May your printer does not support EAN128 directive, use printer#image instead of it.