Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tresf/092f397e4f66ec51ce1d38ef38c5a250 to your computer and use it in GitHub Desktop.
Save tresf/092f397e4f66ec51ce1d38ef38c5a250 to your computer and use it in GitHub Desktop.
var printData = [
'\x1B' + '\x40' + 'Lite Finocchiaro' +'\x0A' + '\x0A' + '\x0A' + '\x0A' + '\x0A' + '\x0A', // Some text and a few line feeds to make sure the initiation and first line are coming through
'\x1D' + '\x28' + '\x6B' + '\x04' + '\x00' + '\x31' + '\x41' + '50' + '0', //select the model (model 2 in this case for my Epson TM-T88V)
'\x1D' + '\x28' + '\x6B' + '\x03' + '\x00' + '\x31' + '\x43' + '3', //set the size of the module
'\x1D' + '\x28' + '\x6B' + '\x03' + '\x00' + '\x31' + '\x45' + '48', //select level of error correction (48,49,50,51) printer-dependent
'\x1D' + '\x28' + '\x6B' + '16' + '0' + '\x31' + '\x50' + '\x30' + 'Testing 1 2 3', //send your data (testing 123) to the image storage area in the printer
'\x1D' + '\x28' + '\x6B' + '\x03' + '\x00' + '\x31' + '\x51' +'48', //print the symbol data in the symbol storage area
'\x1D' + '\x28' + '\x6B' + '\x03' + '\x00' + '\x31' + '\x52' +'48', //Transmit the size information of the symbol data in the symbol storage area
'Buffalo, NY' + '\x0A' + '\x0A' + '\x0A' + '\x0A' + '\x0A' + '\x0A' // more line feeds and text to see if I messed up the QR Code syntax
//'\x1B' + '\x69' + '\x10' + '\x14' + '\x01' + '\x00' + '\x05' // Paper cut and cash drawer kickout
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment