From a PLC, sending data out a serial port to a printer isn't too bad. There are usually send/recv commands for that purpose. The trick is formatting everything how the printer wants; some printers are more complicated than others. I don't know any PLCs where you can control the USB port directly, usually its for programming only, or for the windows half of pcbased system.
From an HMI, it's often not just a simple included function. I've seen serial communication done where they wrote a vbscript that opened the serial port like a file and wrote to it directly. You might be able to do the same to the USB port?