Billing aliens via POS printer and image print

I am trying to create a prototype to print bitmap data for a text file to my LAN enabled epson pos printer TM-T88V.

While I have no problems to send text and text formatting instructions, I dont understand, what I have to do, to make my printer print the data of the Arecibo message.

first few lines:


The message has 73 rows and 23 columns resulting in 1679 picture elements. Each of this elements is defined by either a 1 for black or a 0 as white and should be printed as a square of 8×8 (or 16×16) dots. the result would result in

Billing aliens via POS printer and image print

From the printer’s specifications:

Billing aliens via POS printer and image print

While — as I said — the connecting and sending to the printer is no problem, I just dont get, what this instruction want to tell me. What would in the case of the Arecibo message be

What numbers do I have to send to the printer? Do I need to send every dot? What does nL, nH specify the number of dots of the image data in the horizontal direction as (nL + nH × 256). mean?

Here is my simple Python program I use for prototyping:

# -*- coding: utf-8 -*-
import struct
import socket

def sendInstructions(mySocket,l):
    for x in l:
        mySocket.send(struct.pack('h', *[x]),1)

def emphasizeOn(mySocket):

def emphasizeOff(mySocket):

def lineFeed(mySocket,number):
    for i in range(number):

def paperCut(mySocket):

def sendText(mySocket,string):

def main():
    mySocket = socket.socket ( socket.AF_INET, socket.SOCK_STREAM )

    lines = ["Hello,","World!"]
    for l in lines: 
        if lines.index(l) == 0:




if __name__=="__main__":

Printing a Bit map image to pos printer via comport in C# [closed]

I’m directly printing my receipt to the POS printer via serial port in the following way, SerialPort port = new SerialPort(com6, 9100, Parity.None, 8, StopBits.One); port.Open(); port.Write(Some T

Can print web page using POS/Receipt printer?

I have an intranet web page that consist of only text (no images). I need to print this page using Receipt/POS printer to print it. is it possible or not? thanks

How to connect or print to an ESC/POS printer?

So I purchased an ESC/POS thermal receipt printer that shows up on my machine as a Texas Instruments Generic Bulk Device. When I try to print it prints out the postscript commands instead of the act

Print to a POS thermal printer with .NET

I have TM200 printer.. The vendor doesnt seem to provide any good driver for this.. Αs i see ESC/POS is one method. So i can send directly data to printer via network ,or via raw printing in windows

ESC POS print PNG image

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

How to print image and some data from an android device, using printer (print via bluetooth)?

I am developing one app in which i have to print one receipt, receipt has one logo(static) image view, how can i print this to bluetooth printer? and also i have taken signature by using GestureOverla

Print Image(s) via Paired Bluetooth Printer Canon CP 900, CP 800

I need to connect my app with paired bluetooth devices, that will print images via Bluetooth printer (Canon CP900 & CP800 – SELPHY). And I did not find any Canon Printer Android SDK any help or li

What’s the best way to directly print to a printer, like POS printer, over the web?

Is it possible to print to a networked printer from a web app? Are there any POS or similar form factor printers which can be connected to the internet and printed to directly(given that a port is ope

What’s the best way to directly print to a printer, like POS printer, over the web?

Is it possible to print to a networked printer from a web app? Are there any POS or similar form factor printers which can be connected to the internet and printed to directly(given that a port is ope

Is it possible to print a page/bill on a POS printer with PHP? [closed]

I’m creating a Caffe Bar management application and I’m interested is it possible to print out a page/a bill on a POS printer, using PHP? I was thinking about creating an executable maybe in .NET whic


This command generates one horizontal strip of the image at a time. The strip is either 8 or 24 dots tall, depending on the value of m.

nL and nH are the low and high bytes of an integer that specifies the width in dots of the horizontal strip of image. That width is computed as nL + nH * 256, so if you wanted the image to be 550 dots wide, then nH=2 and nL=38.

The argument d is the bitmap data; if the image strip is 8 dots tall, then each byte represents one column in the strip. If the strip is 24 dots tall, then three bytes represent one column.

So let’s say you have arecibo in a WxH numpy array of ints, 1 or 0. You would:

data = np.zeros((W, H), dtype=np.ubyte)
## (fill in data here)

## Use m=33 since this is apparently the only mode with 
## square pixels and also the highest resolution 
## (unless it prints too slowly for your liking)
m = 33

nH = W // 256  ## note this is integer division, but SO's 
               ## syntax hilighting thinks it looks like a comment.
nL = W % 256

## Divide the array into sections with shape Wx24:
for n in range(data.shape[1] // 24):
    ## Note that if the image height is not a multiple of 24, 
    ## you'll have to pad it with zeros somehow.

    strip = data[:, n*24:(n+1)*24]

    ## Convert each strip into a string of bytes:

    strip = strip.reshape(W, 3, 8)
    bytes = (strip * (2**np.arange(8)[np.newaxis, np.newaxis, :])).sum(axis=2) # magic
    byteString = bytes.astype(np.ubyte).tostring()

    ## Send the command to POS