Open samantrader opened 1 year ago
Hi I use below code in electron js but donot add any printer in windows printers
`var fs = require('fs') var Printer = require('ipp-printer')
var printer = new Printer('My Printer')
printer.on('job', function (job) { console.log('[job %d] Printing document: %s', job.id, job.name)
var filename = 'job-' + job.id + '.ps' // .ps = PostScript var file = fs.createWriteStream(filename)
job.on('end', function () { console.log('[job %d] Document saved as %s', job.id, filename) })
job.pipe(file) }) `
Dear, currently the only workaround I found is to install Bonjour Printer Assistent https://support.apple.com/kb/DL999?viewlocale=de_DE&locale=en_US, then the printer is showing up.
Hi I use below code in electron js but donot add any printer in windows printers
`var fs = require('fs') var Printer = require('ipp-printer')
var printer = new Printer('My Printer')
printer.on('job', function (job) { console.log('[job %d] Printing document: %s', job.id, job.name)
var filename = 'job-' + job.id + '.ps' // .ps = PostScript var file = fs.createWriteStream(filename)
job.on('end', function () { console.log('[job %d] Document saved as %s', job.id, filename) })
job.pipe(file) }) `