I couldn't make my new Star printer print. here is the code:
printer.init({
type: printer.printerTypes.STAR, // 'star' or 'epson'
interface: "tcp://192.168.2.8:9100",
width: 48, // Number of characters in one line (default 48)
characterSet: 'SLOVENIA', // Character set default SLOVENIA
removeSpecialCharacters: false, // Removes special characters - default: false
replaceSpecialCharacters: true, // Replaces special characters listed in config files - default: true
// lineChar: "=", // Use custom character for drawing lines
ip: "localhost", // Ethernet printing IP
port: 9001 // Ethernet printing PORT
});
printer.alignCenter();
printer.println("Hello world");
printer.cut();
printer.execute(function (err) {
if (err) {
console.error("Print failed", err);
reject(err);
} else {
console.log("Print done");
return resolve(true);
}
});
It writes "Print Done" to to console but never prints actually. Is there anyone who faced the same problem?