Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

397
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda