wood burning stoves 2.0*
The moose likes Java in General and the fly likes EPL2 - Load image into to Zebra printer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "EPL2 - Load image into to Zebra printer" Watch "EPL2 - Load image into to Zebra printer" New topic
Author

EPL2 - Load image into to Zebra printer

Jeppe Sommer
Ranch Hand

Joined: Jan 07, 2004
Posts: 270
Hello,

I an trying to load a graphic image directly into a Zebra desktop printer (TLP 2844). To do that I am going to use the language called EPL2, which is command syntax language.

Below you see the command syntax:

Syntax: GWp1,p2,p3,p4DATA

Parameters p1 = Horizontal start position (X) in dots.

p2 = Vertical start position (Y) in dots.

p3 = Width of graphic in bytes. Eight (8) dots = One (1) byte of data

p4 = Length of graphic in dots (or print lines).

DATA = Raw binary data without graphic file
formatting. Data must be in bytes. Multiply
the width in bytes (p3) by the number
of print lines (p4) for the total
amount of graphic data. The printer automatically
calculates the exact size of
the data block based upon this formula.


My questions are:

1) How to we get the width of graphic in bytes?



2) How to we get the height of graphic in dots?

3) We need to send raw binary data in bytes as the DATA parameter. Do we have to convert it into a string, like below:



Thanks in advance
 
 
subject: EPL2 - Load image into to Zebra printer