Skip to content

tonyjara/nodePrinter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nodePrinter

Nodeprinter is a simple nodejs rest api that uses a fork of the node-printer repo and combines them with node-thermal-printer the way it works is that you can send commands to the localhost:1337/printer-data in an object as follows { printerName: string; printerCommands: string[] }

effortless example: let printerData = { printerName: "nodePrinter", printerCommands: [ "printer.newLine()", "printer.newLine()", "printer.alignLeft()", printer.println('Fecha: ${format( fromUnixTime(sale.createdAt), "dd/MM/yy HH:mm" )}'), "printer.newLine()", printer.println('Cliente: ${ sale.customer ? sale.customer.razonYRuc : "Sin nombre" }'), printer.println('Forma de pago: ${paymentTypeName( sale.paymentType )}'), "printer.alignLeft()", ...productsList, "printer.alignCenter()", "printer.newLine()", printer.println('Total: ${sale.total}'), "printer.newLine()", "printer.newLine()", "printer.newLine()", "printer.drawLine()", "printer.newLine()", "printer.newLine()", ], };

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published