ESC POS print PNG image

user2546107 picture user2546107 · Jul 3, 2013 · Viewed 7.8k times · Source

I am very new to ESC POS programming on Objective C. I have tested the printer with normal ESC pos line command and it works perfectly. But I was unable to understand the raster mode command. (GS v 0)

What I simply need is print the PNG receipt using ESC POS (I am creating the receipt as a PNG file) - Generic ESC POS (not STAR or EPSON) I tried to search about this command and spec is unclear.

Answer

Mark JW picture Mark JW · Aug 10, 2013

I am doing this from my Android app, using the Epson TM-IV 88 printer.

You use the utility called TMFlogo to flash the .bmp logo file to the printer. The printer can store 10 separate images.

Then you send the FS code such as below to print the logo.

Note the sendCommand is just a specific function in my app to send the FS sequence to the printer.

sendCommand("FS p 1 0");    // print the logo in NVRAM position 1
sendCommand("FS p 2 0");    // print the logo in NVRAM position 2

And here is a summary of the FS command parameters for Epson ESC:

ASCII FS p n m
Hex 1C 70 n m
Decimal 28 112 n m
where
1<=n<=255
0<=m<=3, 48<=m<=51
prints NV bit image n using mode m
where
m = 0,48 normal mode
m = 1,49 double-wide mode
m = 2,50 double tall mode
m = 3,51 quadruple mode

Best of luck.