One deep dive into the IPP protocol, printer drivers, and specific supported formats (“what the hell is an octet-stream?!”) later, I have something functional.
I’m not a JS guy, so I don’t know if it’s a very node-y way to do it. But except for the pages coming out a little scaled this works:
Edit to briefly explain what this does: The mail node ingests unread emails and passes them forward to a function node that checks for pdf attachments. Those are passed forward one by one to a function node that takes care of converting the pdf to pcl (my printer supposedly knows how to handle pdf 1.7 but doesn’t, so I had to resort to this) and passes it to the IPP node as a data buffer .