Commands are sent to /dev/usb/lp0
$ npm install node-thermal-printerprinter.execute();// Executes all the commandsprinter.print("Hello World");// Append textprinter.println("Hello World");// Append text with new lineprinter.cut();// Cuts the paperprinter.bold(true);// Set text boldprinter.drawLine();// Draws a lineprinter.alignCenter();// Align text to centerprinter.alignLeft();// Align text to leftprinter.alignRight();// Align text to rightprinter.setTypeFontA();// Set font type to A (default)printer.setTypeFontB();// Set font type to Bprinter.setTextNormal();// Set text to normalprinter.setTextDoubleHeight();// Set text to double heightprinter.setTextDoubleWidth();// Set text to double widthprinter.setTextQuadArea();// Set text to quad areavarprinter=require("node-thermal-printer");printer.alignCenter();printer.println("Hello world");printer.cut();printer.execute();