https://github.com/atlantis-software/node-lpr
line printer remote library for Node.js
https://github.com/atlantis-software/node-lpr
Last synced: about 1 month ago
JSON representation
line printer remote library for Node.js
- Host: GitHub
- URL: https://github.com/atlantis-software/node-lpr
- Owner: Atlantis-Software
- License: mit
- Created: 2021-01-22T10:13:02.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-01-22T10:21:45.000Z (about 5 years ago)
- Last Synced: 2025-10-27T18:44:54.682Z (5 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 2
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-lpr
A line printer remote library for Node.js
## Installation
Installation uses the [npm](http://npmjs.org/) package manager. Just type the following command after installing npm.
npm install node-lpr
## Example
```javascript
var lpr = require('node-lpr');
var content = Buffer.from('content to print');
var printer = new lpr({
ip: 'my.ip.v4.address',
port: 515,
queue: 'raw',
debug: console.log
});
printer.connect(function (err) {
if (err) {
return console.log(err);
}
var job = printer.createJob({
name: "my job",
data: content
});
job.send(function (err) {
if (err) {
console.log(err);
}
printer.disconnect();
});
});
```
## License
node-lpr is available under the MIT license.