Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

204
Views
Cómo crear un código de barras ESC/POS con navigator.bluetooth.requestDevice en Javascript

Estoy tratando de obtener un código de barras de una impresora de etiquetas móvil. Pero no pude conseguirlo. Estoy tratando de enviar el código esc/pos usando navigator.bluetooth.requestDevice. La luz de la impresora está encendida, pero no imprime. ¿Dónde estoy haciendo mal? Estaré encantado si usted puede ayudar con el problema.

 var esc = '\x1B'; //ESC byte in hex notation var newLine = '\x0A'; //LF byte in hex notation var zpl = esc + "@"; //Initializes the printer (ESC @) zpl += esc + '!' + '\x38'; //Emphasized + Double-height + Double-width mode selected (ESC ! (8 + 16 + 32)) 56 dec => 38 hex zpl += 'BEST DEAL STORES'; //text to print zpl += newLine + newLine; zpl += esc + '!' + '\x00'; //Character font A selected (ESC ! 0) zpl += 'COOKIES 5.00'; zpl += newLine; zpl += 'MILK 65 Fl oz 3.78'; zpl += newLine + newLine; zpl += 'SUBTOTAL 8.78'; zpl += newLine; zpl += 'TAX 5% 0.44'; zpl += newLine; zpl += 'TOTAL 9.22'; zpl += newLine; zpl += 'CASH TEND 10.00'; zpl += newLine; zpl += 'CASH DUE 0.78'; zpl += newLine + newLine; zpl += esc + '!' + '\x18'; //Emphasized + Double-height mode selected (ESC ! (16 + 8)) 24 dec => 18 hex zpl += '# ITEMS SOLD 2'; zpl += esc + '!' + '\x00'; //Character font A selected (ESC ! 0) zpl += newLine + newLine; zpl += '11/03/13 19:53:17';
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!