leitzicon
v0.0.1
Published
a node.js module to print labels using the Leitz Icon printer
Downloads
2
Readme
Leitz Icon label printer
A node.js module to print labels using the Leitz Icon printer.
It uses the Internet Printing Protocol (IPP), which is the prefered option when printing over wifi.
It also uses the png2lwxl node.js module, written by me, to convert PNG files to the appropriate printer format.
Install
You can install leitzicon using the Node Package Manager (npm):
npm install leitzicon
Simple example
var leitz = require('leitzicon');
var fs = require('fs');
leitz.printPNG(__dirname + '/test.png', 'http://192.168.1.1:631/ipp/print', {}, function (err) {
if(err) return console.log(err);
console.log("print complete");
});
png2lwxl options
- landscape: rotates image 90 degrees [default = false].
- blackwhiteThreshold: enter a value between 0 and 255. The higher the value, the more pixels will be treated as black [default = 128].
example with options
var leitz = require('leitzicon');
var fs = require('fs');
leitz.printPNG(__dirname + '/test.png', 'http://192.168.1.1:631/ipp/print', {
landscape: true,
blackwhiteThreshold: 110
}, function (err) {
if(err) return console.log(err);
console.log("print complete");
});