forked from Klemen1337/node-thermal-printer
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Klemen Kastelic
committed
May 15, 2015
1 parent
45c0ee0
commit 748d57d
Showing
2 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters