ho fatto una domanda del genere .. l'ho fatto usando http://nwjs.io/ e il modulo nel commento: https://www.npmjs.com/package/printer, ecco un codice di lavoro con questa stampa RAW nella stampante predefinita un file di modulo:
var printer = require('printer');
var fs = require('fs');
var info = fs.readFileSync('ticket.txt').toString();
function sendPrint() {
printer.printDirect({
data: info,
type: 'RAW',
success: function (jobID) {
console.log("ID: " + jobID);
},
error: function (err) {
console.log('printer module error: '+err);
throw err;
}
});
}
sendPrint();
è possibile adattarlo per utilizzare il metodo getPrinters() per enumerare tutte le stampanti installate e quindi consentire all'utente di selezionare quello desiderato.
Questo potrebbe aiutarti https://github.com/tojocky/node-printer – yvesmancera
Hey Agustin ... suficiente con mi respuesta o todavía estas atascado? – edsadr
No lo ha intentado, pero parece que funcionaría, en un rato te digo. Gracias! –