I have a string of printer escape sequences (ESC/P) that I need to send to a printer (either USB or network) on Mac OS X. How can I do that? Is using CUPS directly the best way? Is there a "higher level" way?
And before you ask: I really do need to send escape sequences and can't simply use the high-level printing system.
Edit: These are some projects and resources that provide similar functionality in other languages like Java:
I would imagine that the best way to do this would be to just use CUPS/lp:
echo "ctrl_char" | cat file_to_print - | lp [...flags...]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With