Commands are sent to /dev/usb/lp0
$ npm install node-thermal-printer
printer.execute(); // Executes all the commands
printer.print("Hello World"); // Append text
printer.println("Hello World"); // Append text with new line
printer.cut(); // Cuts the paper
printer.bold(true); // Set text bold
printer.drawLine(); // Draws a line
printer.alignCenter(); // Align text to center
printer.alignLeft(); // Align text to left
printer.alignRight(); // Align text to right
printer.setTypeFontA(); // Set font type to A (default)
printer.setTypeFontB(); // Set font type to B
printer.setTextNormal(); // Set text to normal
printer.setTextDoubleHeight(); // Set text to double height
printer.setTextDoubleWidth(); // Set text to double width
printer.setTextQuadArea(); // Set text to quad area
var printer = require("node-thermal-printer");
printer.alignCenter();
printer.println("Hello world");
printer.cut();
printer.execute();