Hello, I having an issue on finding a suitable nodes to give command to the Printer. Im connecting my printer with PC via Ethernet. My printer brand is Sato, model number is CL4NX. Does anyone have ever tried to communicate between Printer and Node-Red?
Maybe this thread may help Printing from NodeRed
There are many more if you search the forum.
Hey, thanks for the reply.
I have read that forums. But sadly I am a beginner and just started exploring and sometime things are very hard for me to understand. It would really be helping if you can teach me on how to use the pdf-to-printer npm. Actually I have tried to install the npm install --save pdf-to-printer but when I check, there is no new nodes added to my pallette. Look like it is not installed into the pallette. Im still trying to search for the npm available in the forum. It would be really helpful if someone can assist me in this issue.
You install the npm module in the function node using the setup tab. and then call it in the on message tab in your js code
example flow. Untested
[{"id":"640871e12ec4dbab","type":"function","z":"d1395164b4eec73e","name":"function 157","func":"let pdffile = msg.payload;\npdfToPrinter.print(pdffile)\n .then((result) =>{\n msg.payload = result\n })\n .catch((error) => {\n node.error(error)\n });\n\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[{"var":"pdfToPrinter","module":"pdf-to-printer"}],"x":330,"y":100,"wires":[["266d6c70488e5b9b"]]},{"id":"497b089e8492eb75","type":"inject","z":"d1395164b4eec73e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"/path/to/name.pdf","payloadType":"str","x":190,"y":80,"wires":[["640871e12ec4dbab"]]},{"id":"266d6c70488e5b9b","type":"debug","z":"d1395164b4eec73e","name":"debug 2558","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":530,"y":100,"wires":[]}]
I have never used this module as my system is not supported.
There are more examples on the link url in above post to get printers etc.
You also have to have functionExternalModules set to true in your setting.js file. Writing Functions : Node-RED
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.