[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Using Zebra EPL2 Command do Print a PCX Image

Posted on 2005-04-14
8
Medium Priority
?
5,719 Views
Last Modified: 2008-01-09
I am trying to send an image to the Zebra TLP 2844 in binary format.  It uses the EPL2 language, which has the following command.

*********** TYPED FROM PROGRAMMING MANUAL

GW - Direct Graphic Write

Description: Use this command to load binary graphic data directly into the Image Buffer memory for immediate printing.  The printer does not store graphic data sent directly to the image buffer.

The graphic data is lost when the image has finished printing, power is removed or the printer is reset, etc. etc.

Syntax: GWp1,p1,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.

*************** END OF MANUAL

I alread have the method that i use to send strings directly to my LPT1 Port, but i have no idea of how could i send this image.

Could anybody help me please?
0
Comment
Question by:regisdaniel
  • 3
  • 3
7 Comments
 
LVL 9

Expert Comment

by:Lacutah
ID: 13787482
Essentially, it sounds like you need to break the images into pixels, 1 = pixes on, 0 = pixel off, gather 8 pixels at a time, and send a byte array(?).

So, if you have a bitmap image (B&W), you could use it's width for p3, it's height for p4, number of bytes in the array would be:
        Dim numBytes As Integer = (p3 * p4) \ 8
        If (p3 * p4) Mod 8 > 0 Then numBytes += 1

and you can use the bitmap.GetPixel(x,y) to determine if the bit should be on or off:
       If bmp.GetPixel(0, 0).Equals(Color.Black) Then ...
0
 

Author Comment

by:regisdaniel
ID: 13787542
Thanks Lacutah.

But, i have another question...

I supose that i need to send a string as the DATA parameter.
Could you please give a example of how this string could be?

Thanks!
0
 
LVL 9

Expert Comment

by:Lacutah
ID: 13787554
Then you need to know how to draw a string, one line at a time, pixel by pixel.

Are you trying to print out one label with one image (that includes text) without using any seperate text printing commands?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:regisdaniel
ID: 13787582
No. My label will have my Company Logo, that is the image that i trying to print, some text information, and a barcode. All these comands are being sent and are working correctly, except the image...

The manual doesn't tell how the string should be formated. The manual says only that what a mentioned above...

Thanks again for your help!
0
 
LVL 9

Accepted Solution

by:
Lacutah earned 1500 total points
ID: 13787603
Dim s As String = "ABCDE"
        Dim b() As Byte
        b = System.Text.Encoding.Default.GetBytes(s)
0
 

Expert Comment

by:mjimeno
ID: 14052073
regisdaniel, have you find a solution for your problem? I'm stuck in the same problem, trying to print a graphic via EPL2, but neither the manual nor the internet help me. If you found a solution, please please let me know.
Thanks a lot for your help.
M
0
 

Author Comment

by:regisdaniel
ID: 14052676
Hi mjimeno

No, I tried to apply the information above, but i didn't worked. The closest solution that i found was a Delphi code, that could be found on the EE searching for the GW funcion. I tring to convert the Delphi code to VB.Net, but i did't finished yet because i'm not expert in Pascal. If i find any solutions, i'll post here and, if you find something before me, plese let me know too.

Thanks!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question