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.