Skip to content

Latest commit

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

node-ptouch

A node.js library to print ptouch label on brother label printer.

Description

a node.js library to print ptouch label on brother label printer.

now tested on:

  • QL-820NWB

Installation

Installation uses the npm package manager. Just type the following command after installing npm.

npm install node-ptouch

Example

varPtouch=require('node-ptouch');varnet=require('net');// generate ptouch codevarptouch=newPtouch(1,{copies: 2});// select template 1 for two copiesptouch.insertData('myObjectName','hello world');// insert 'hello world' in myObjectNamevardata=ptouch.generate();// send data to printervarsocket=newnet.Socket();socket.on('close',function(){console.log('Connection closed');});socket.connect(9100,'192.168.1.200',function(err){if(err){returnconsole.log(err);}socket.write(data,function(err){if(err){returnconsole.log(err);}console.log('data sent');socket.destroy();});});

Documentation

License

node-ptouch is available under the MIT license.

About

A node.js library to print ptouch label on brother label printer.

Resources

Stars

13 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages