I need to send a sequence of control codes (decimal 27, 112, 0, 25 and 250) to a USB printer "Epson TM printer" using Powershell.
I would like to put the control codes in decimal in a plain text file. e.g. keys.txt.
Content of keys.txt
27
112
0
25
250
What is the easiest way to send the control codes to the USB printer? I am thinking whether I need to create a "Generic / Text only" printer pointing to the same USB port, and then use Out-Printer "Generic / Text only" to send the control codes to it.
I tried
gc keys.txt | out-printer "Generic / Text only"
but the result was not what I wanted. Any help is much appreciated.
Thanks