cancel
Showing results for 
Search instead for 
Did you mean: 

Using graphic objects in ZPl for SAP Script

Former Member
0 Kudos

Hi,

I am using ZPL II for some barcode-enabled labels, and I also have to use some graphics but I have no idea how to do this directly in ZPL...

I tried command ~DG, but it is not much of a use, since I than have to use the directory of the file (used in SE78), but impossible to find this file's path....

Any ideas?

(P.S. I cannot use Bar One, Nice Label or any other middleware...)

Accepted Solutions (1)

Accepted Solutions (1)

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

I was able to do this once before, but I had to "download" the image to the printer first. I think I did this by uploading the image to standard text(via SE78) not as a graphic, then I took the hex representation of the image from SE78 and put this in a sapscript form with the appropriate ZPLII commands, wrote a quick report program to print this sapscript to the printer, after that, the image is there on the printer, then you can use it with the appropriate ZPLII commands. The problem with this is that you must download the graphic to every printer initially, and anytime you change the print server.

Regards,

Rich Heilman

Former Member
0 Kudos

Thanks for your input Rich,

I don't get how to hadle this part of your answer:

..<i>then I took the hex representation of the image from SE78 and put this in a sapscript form with the appropriate ZPLII commands, wrote a quick report program to print this sapscript to the printer,</i> ...

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Ok, I'll try again.

In my case, I had to "download" the image to the printer in order to use it later. So what I did to download this is I wrote a sapscript which in the MAIN window had the appropriate ZPLII commands as well as the hex code for the image. when you upload the image to SE78, in the "Stored as Text" section, under standard text, this image is stored as standard text and you can get the hex code from SO10. Go to S010, enter the object and click display. Here you can see the hex representation of the image, I took this hex code and put it in my sapscript with the ZPLII commands to download this image. I wrote a small program to print this sapscript to the printer, which really didn't print anything, just downloaded the image to the printer.

Now back to the real requirement, I create the sapscript and print program and used the ZPLII commands which uses this image stored on the printer.

Regards,

RIch Heilman

Former Member
0 Kudos

Thanks again Rich,

But this looks pretty 'unflexible'.... How about downloading the graphic to the printer using ~DY(download graphics)? Here I just need to figure out where is my graphic (from SE78) stored, in which directory...

I tried by using function SAPSCRIPT_GET_GRAPHIC_BDS which returns me a nice File Content in RAW data type, but impossible to figure out how to use it in my SAP Script (ZPL).....

Any ideas?

Former Member
0 Kudos

I eventually found a (n easy...) way to do this, just by following this procedure:

https://support.zebra.com/cpws/docs/znetbridge/zpl_conv_graph.htm

Cheers!

Former Member
0 Kudos

Is it also possible to view the file's hex code or something, so I can create a standard text this way and print this via Script?

Or does it only create a ZPL file? And what do I need to do with this file?

Answers (0)