Search code examples
windowsprintingcommandescpos

How to print .txt file containing esc/pos commands using command prompt in windows?


I am trying to print ESC/pos commands from the .txt file using windows command prompt.

Let me explain what I tried so far:

I have connected my Epson Tm-m30 printer. Using a virtual port driver I can print the .txt file using the following command:

print /d:COM1 'file path'

Now my question: as it is, ESC/pos printer needs to print the ESC/pos commands like a paper cut, barcode printing, etc. When I paste the ESC/pos commands in the .txt file, it is print as it is, not as ESC/pos commands.

I am trying to print The following ESC/pos commands:

\x1B\x40
\x1D(k\x0d\x00\x30\x50\x30TEST PRINT
\x1D(k\x03\x00\x30\x51\x

But while printing it is printing it looks like above, not as ESC commands.

How do I print ESC/pos commands using a .txt file?


Solution

  • There are no commands built into Windows by default, so the following options are possible.