Node.js : How to add print job to printer

前端 未结 2 918
北恋
北恋 2021-01-03 10:02

I am developing a web application using node.js where i have a scenario to print some pdf files located in my local.

Ex:

var ipp = require(\'ipp\');
         


        
2条回答
  •  抹茶落季
    2021-01-03 10:28

    If I understand you correctly, you want to print local PDF files, and printing works already?

    Node.js has the fs api you can use to retrieve a PDF file. http://nodejs.org/api/fs.html

    https://npmjs.org/package/ipp To me it doesn't seem you have to use a PDFkit object as data -property in your operation. You can just use data you can read with fs.

提交回复
热议问题