Trigger Print Event from HA?

I would like to be able to print a pre-defined file (on my HP printer) when certain events happen in home assistant. Is this possible? What do I need to install? (I have IPP installed, but it seems to only allow me to read sensors - not to trigger a print)

Perhaps this could be of use?

Automation to Prevent Printer Head clogging (Epson) - Configuration - Home Assistant Community (