Q:

Printing in Zebra label printer

I'm trying to print images on a Zebra printer using ZPL commands.
This is the code:
^XA
^FO10,10^XGR:ICONE.GRF,3,3^FS
^XZ

My problem is that I can't print image from the Flash Memory. I only get image printed from DRAM memory. Could some one give me some tips?

A:

Your ZPL sample relies on the printer having been pre-configured correctly by uploading the image to the printer memory (at the printer memory path R:ICONE.GRF). This is a little more brittle than just embedding the image directly in the ZPL, as you have found out.
If you're always embedding the same image (which appears to be the case), and if you're not worried about shaving milliseconds off of your print latency (most people aren't), then I'd recommend embedding the image directly in your ZPL using the ^GF command.
There's a little bit of black magic involved in getting the ^GF command right, but it's pretty easy if you have ZebraDesigner installed or if you just use Labelary to add the image to your label ZPL template.

A:

Why don´t you create a memory bitmap loading the image from E: into it and printing from this memory image? You could do something like:
    Dim image1 As Bitmap = CType(Image.FromFile("E:\ImageFile.bmp", True), Bitmap)

You may also put a PictureBox in your form, load the image into it and call your Zebra code on that control - it´s in memory too.

