node-printer-all
v1.0.0
Published
Lib para imprimir en todos os dispositivos
Downloads
1
Maintainers
Readme
NODE PRINTER ALL
Node.js module for thermal printers.
🔗 node-thermal-printer 🔗 node-printer
Installation
$ npm install node-printer-all
or
$ yarn add node-printer-all
Features
const Printer = require("node-printer-all");
let print = Printer(
{
type: PrinterTypes.STAR, // Printer type: 'star' or 'epson'
interface: 'tcp://xxx.xxx.xxx.xxx', // Printer interface
characterSet: 'SLOVENIA', // Printer character set - default: SLOVENIA
removeSpecialCharacters: false, // Removes special characters - default: false
lineCharacter: "=", // Set character for lines - default: "-"
options:{ // Additional options
timeout: 5000 // Connection timeout (ms) [applicable only for network printers] - default: 3000
}
}
)
or
import {Printer} from "node-printer-all";
let print = Printer(
{
type: PrinterTypes.STAR, // Printer type: 'star' or 'epson'
interface: 'tcp://xxx.xxx.xxx.xxx', // Printer interface
characterSet: 'SLOVENIA', // Printer character set - default: SLOVENIA
removeSpecialCharacters: false, // Removes special characters - default: false
lineCharacter: "=", // Set character for lines - default: "-"
options:{ // Additional options
timeout: 5000 // Connection timeout (ms) [applicable only for network printers] - default: 3000
}
}
)
To understand more about the functions access node-thermal-printer
How to run examples
Network printer
node examples/example.js tcp://xxx.xxx.xxx.xxx
Pritner name via Printer module
node examples/example.js 'printer:My Printer'
Local port or file
node examples/example.js '\\.\COM1'