Skip to content

Commit

Permalink
Add support for underlines (1 and 2 dot thickness)
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinbolton committed Jun 20, 2016
1 parent 1deda27 commit 22c44d6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ printer.println("Hello World"); // Append text with n
printer.cut(); // Cuts the paper

printer.bold(true); // Set text bold
printer.underline(true); // Underline text (1 dot thickness)
printer.underlineThick(true); // Underline text with thick line (2 dot thickness)
printer.drawLine(); // Draws a line
printer.newLine(); // Insers break line

Expand Down
10 changes: 10 additions & 0 deletions node-thermal-printer.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,16 @@ module.exports = {
if(enabled) append(config.TXT_BOLD_ON);
else append(config.TXT_BOLD_OFF);
},

underline: function(enabled){
if(enabled) append(config.TXT_UNDERL_ON);
else append(config.TXT_UNDERL_OFF);
},

underlineThick: function(enabled){
if(enabled) append(config.TXT_UNDERL2_ON);
else append(config.TXT_UNDERL2_OFF);
},

alignCenter: function (){
append(config.TXT_ALIGN_CT);
Expand Down

0 comments on commit 22c44d6

Please sign in to comment.