我尝试使用ipp-printer模块创建虚拟打印机,但无法添加打印机
var fs = require('fs')
var Printer = require('ipp-printer')
var printer = new Printer({name:"my-printer", port:8081})
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)
})
在添加打印机屏幕上看不到我的打印机名称