Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

398
Vistas
how to get all attached printers name on our computer using nodeJS

my scenario is... I'm making a web application for a restaurant using (NodeJS and Angular 12), and they are using thermal printers, all printers connected via USB and LAN. I need a solution - how I can get the list of all connected printers and print receipts on all printers without a preview dialog box..!!!

currently, I'm not able to list all connected printers list, and print receipts on them

please help me to find a proper solution

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

There was a node-printermodule but I guess it was abandoned, the last most recent module for that is zuzel-printer, but the last update is from 6 years ago. Let's hope it fits your needs

Link: zuzel-printer https://www.npmjs.com/package/zuzel-printer

about 4 years ago · Juan Pablo Isaza Denunciar

0

const { exec } = require('child_process');
exec('wmic printer list brief', (err, stdout, stderr) => {
if (err) {
    // node couldn't execute the command
    return;
}
// list of printers with brief details
console.log(stdout);
// the *entire* stdout and stderr (buffered)
stdout = stdout.split("  ");
var printers = [];
j = 0;
stdout = stdout.filter(item => item);
for (i = 0; i < stdout.length; i++) {
    if (stdout[i] == " \r\r\n" || stdout[i] == "\r\r\n") {
        printers[j] = stdout[i + 1];
        j++;
    }
}
// list of only printers name
console.log(printers);
console.log(stderr);
});
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda