diff --git a/README.md b/README.md index a8cded8..5d40df8 100644 --- a/README.md +++ b/README.md @@ -1 +1,39 @@ # node-thermal-printer +Commands are sent to ```/dev/usb/lp0``` + +### Installation +```bash +$ npm install node-thermal-printer +``` + +### Features +```js +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 +``` + +### Examples +```js +var printer = require("node-thermal-printer"); +printer.alignCenter(); +printer.println("Hello world"); +printer.cut(); +printer.execute(); +``` \ No newline at end of file diff --git a/package.json b/package.json index 526215a..4713a5d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-thermal-printer", - "version": "0.0.1", + "version": "0.0.3", "description": "Made to work with Epson thermal printers", "main": "printer.js", "scripts": {