Printing an image via printUnformatted

Forums for specific tips, techniques and example code
Mrpopup
Posts: 1
Joined: Thu Aug 20, 2009 9:47 am

Printing an image via printUnformatted

Postby Mrpopup » Sun Sep 11, 2011 11:47 am

We have a need to print an image (logo) on a serial thermal printer. All output to this device is via printUnformatted.
Does anyone know how to achieve this?
Printer is an Epson TM-T88iii.
Thanks.

murray
Posts: 144
Joined: Fri Aug 14, 2009 6:58 pm
Location: New Plymouth, New Zealand

Re: Printing an image via printUnformatted

Postby murray » Sun Sep 11, 2011 7:51 pm

We have a need to print an image (logo) on a serial thermal printer. All output to this device is via printUnformatted.
Does anyone know how to achieve this?
Printer is an Epson TM-T88iii.
Thanks.
The Epson printers have a command set for performing a wide range of functions, including printing a bitmap image. Typically they start with the ASCII "Escape" character followed by a few characters of parameters, followed by a block of binary data representing the bitmapped image.
e.g. ESC, '*', m, nL, nH, d1, d2, ... dn (where m sets the graphics mode and nL and nH set the number of data bytes).
In this example d1, d2 ... dn represent the bitmap data bytes which need to be readfrom a bitmap image file. Some data conversion may be necessary to get the bitmap into the desired format for printing.

If you don't already have the command reference manual you should be able to locate a copy on the web.
The older Epson printers always used to have a debug feature where you could switch them into a mode that would dump out all the received data in a hexadecimal dump to verify what bytes the printer was actually receiving. I presume the current models still include such a feature - I used to find it useful for debugging the command sequences.
Murray (N.Z.)


Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 23 guests