I am in need of developing an electron based desktop application which will listen for PDFs and ZPL files from a remote server. The application needs to print the PDFs and the ZPL files to the selected printer. Please note that the PDFs and ZPLs are generated remotely and sent as files, so I cannot use webContents.print() API in electron.
The functionalities would include getting the list of printers along with their statuses and able to send printing data to them. The following are the methods/tools I researched.
I have considered using wmic from the node process to get the printers list along with their states but it seems that admin privileges are needed.
I saw many of Node JS implementations have used the node-printer package but it seems like it is out of maintenance.
I have also looked into using native windows APIs using ffi but couldn't find some easy-to-use guides.
Currently, I have decided to use sumatra PDF for printing PDFs. I'm stuck with printing ZPL files and stuck with getting printers meta data.
Could someone please point me in the right direction.
Thanks for your help in advance.