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

322
Visualizações
Electron Pos Printer prints empty receipt

I am using this library Electron Pos Printer, and I have made a small batch of code. I have successfully connected my POS thermal printer, but when I send a command to print, it only "prints" a small amount of blank paper. Any ideas on fixing this, or maybe a recommendation for some other library?

let printerName = "myprinter";
let widthPage = "155";
const data = [
    {
        type: "text", // 'text' | 'barCode' | 'qrCode' | 'image' | 'table
        value: "This is sample print job",
        style: `text-align:center;font-size:16px;`,
    },
    {
        type: "qrCode",
        value: "https://github.com/fssonca",
        height: 55,
        width: 55,
        style: "margin-left:50px",
    },
];
PosPrinter.print(data, {
    preview: false, // Preview in window or print
    width: widthPage, //  width of content body
    margin: "0 0 0 0", // margin of content body
    copies: 1, // Number of copies to print
    printerName: printerName, // printerName: string, check it at webContent.getPrinters()
    timeOutPerLine: 400,
    silent: true,
}).catch((err) => console.log(err));
about 4 years ago · Juan Pablo Isaza
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