printers
v1.0.2
Published
Printers is a simple to use module that allows you print a pdf or a text file. For now, this module only work on macs.
Downloads
10
Readme
Printers
Printers is a simple to use module that allows you print a pdf or a text file. For now, this module only work on macs.
Installation
npm i printers
How to use
Get the default printer
const printers = require('printers')
const defaultPrinter = printers.getPrinter()
/*
Expected Output: HP....
*/
Print a file
You can give a relative or absolute path to print the file.
const printers = require('printers')
const defaultPrinter = printers.print('/Users/JohnDoe/Desktop/test.txt')
/*
Expected Output: true
*/