
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
node-pdf-printer
Advanced tools
Print PDF files in Windows OS by node.js. (supports Node, Electron. Only node.js without c++)
If you use it in electron, check out: https://github.com/sindresorhus/electron-util#fixpathforasarunpackpath
npm i node-pdf-printer
import NodePdfPrinter from 'node-pdf-printer'
import path from 'path'
NodePdfPrinter.listPrinter('en-US') // Returns a promise with the array of printer names, this isn't a mandatory step
const array = [
'C:\\abc\\a.pdf',
path.resolve('./<your project folder>/some-pdf.pdf')
]
NodePdfPrinter.printFiles(array) // Printer files to the default Windows printer.
NodePdfPrinter.printFiles(array, printerName) // Printer files to the specific printer by the printer name.
NodePdfPrinter.printFiles(array, printerName, execPath) // Printer files to the specific printer by the printer name, specify the path of the executable file.
PDF-XChange Viewer cannot save a duplex-printing option as the default. To print in duplex mode, modify the settings of your Windows printer (in the Windows Control Panel or Settings app) to enable duplex printing, or create a duplicate copy of your Windows printer, set it to print in duplex by default, and specify that printer when running PDFtoPrinter.exe. Search the web if you don't know how to create a duplicate copy of your Windows printer or if you don't know how to specify duplex printing in your Windows printer properties.
More: http://www.columbia.edu/~em36/pdftoprinter.html
Thanks krdheeraj51 and qwqVictor, Columbia University.
FAQs
Print PDF files in Windows OS by node.js.
We found that node-pdf-printer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.