Well good news and bad news.
Good news is I am successfully printing labels on the Brother P950NW P-Touch label printer.
Bad news is I never could get the Raster command set working. There was just too much to unpack and the documentation was not clear enough to implement a working solution.
I instead had to utilize their ESC/P command set which has support for printing Text, Bar Codes, and QR codes. My requirements were just to print a QR code then to the right of that some text. I was able to accomplish this with the ESC/P commands. Resulting in this demo label:
I wish I could have used Raster so we could create an image file for the label, then pass it into a print node that would print the image input into it. This would have made it more dynamic and would have greatly improved the usability of such a node. That said I am running out of time on this project so this solution will have to do for my current purposes.
That said if anyone wants to expand on this at a later date I would be happy to collaborate. I would think there are use cases for printing labels from Node-Red and I'm surprised there isn't anything developed yet.
The P-Touch printer line is really nice and the P950NW is a great network connected industrial printer for use cases like this.
Here is a demo flow. Hopefully someone will find it useful in the future.
Note you will need to change the IP address in the TCP Out node to match the IP of the printer on your network. This was tested on the P950NW only, however it should work with any PXXX series printer.
[{"id":"7485e39c17734bdd","type":"inject","z":"3e723b31668690b3","name":"","props":[{"p":"address","v":"00:13:A2:00:01:02:03:04","vt":"str"},{"p":"engineer","v":"Morgan","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":810,"y":1100,"wires":[["ed5f98e9b4d777e8"]]},{"id":"ed5f98e9b4d777e8","type":"function","z":"3e723b31668690b3","name":"","func":"var PTOUCH_ESC_P_MODE = Buffer.from([0x1b, 0x69, 0x61, 0x00]);\nvar INITIALIZE = Buffer.from([0x1b,0x40]);\nvar LARGE_QR = Buffer.from([0x1b,0x69,0x51,0x0C,0x02,0x00,0x00,0x00,0x00,0x02,0x00]);\nvar AUTO_LENGTH = Buffer.from([0x1b,0x69,0x6c,0x00,0x00]);\nvar LEFT_MARGIN = Buffer.from([0x1b, 0x24, 0x3C, 0x00]);\nvar FONT = Buffer.from([0x1B, 0x6B, 0x00]);\nvar FONT_SIZE = Buffer.from([0x1B, 0x58, 0x34]);\n\nvar payload = [];\npayload.push(PTOUCH_ESC_P_MODE); //Command to put printer in ESC P command mode\npayload.push(INITIALIZE); //Command to initialize printer for commands\n\n//QR Code Bytes\npayload.push(LARGE_QR); //QR code config bytes 12 dots per per cell, Model 2, auto input\npayload.push(Buffer.from(msg.address+\"\\\\\\\\\\\\\", \"utf-8\")); //Payload to embed in QR Code. Note requires three \\ to end QR payload\n\n//Text bytes\npayload.push(AUTO_LENGTH); //Auto set length of label\npayload.push(LEFT_MARGIN); //1\" left margin to allow for QR code on left side of label\npayload.push(FONT); //Helsinki font\npayload.push(FONT_SIZE); //12pt font size\npayload.push(Buffer.from(msg.address.substring(0,11)+\"\\n\", \"utf-8\")); //print first half of address on top line\npayload.push(LEFT_MARGIN); //1\" left margin to allow for QR code on left side of label\npayload.push(Buffer.from(msg.address.substring(12,23)+\"\\n\", \"utf-8\")); //print second half of address on second line\npayload.push(LEFT_MARGIN); //1\" left margin to allow for QR code on left side of label\npayload.push(Buffer.from(\"QC: \"+msg.engineer, \"utf-8\")); //print quality control engineer on third line\npayload.push(Buffer.from([0x0c])); //execute print command\n\nmsg.payload = Buffer.concat(payload);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":980,"y":1100,"wires":[["767988cf5db162d6"]]},{"id":"767988cf5db162d6","type":"tcp out","z":"3e723b31668690b3","host":"192.168.0.50","port":"9100","beserver":"client","base64":false,"end":true,"name":"","x":1200,"y":1100,"wires":[]}]
@Steve-Mcl @Steve-Mcl @madmax thank you for contributing what you could to this thread.