-1

Does anyone knows how to simply hide or display an image of a log (jpeg) on a label based on a parameter ? We know how to display the image, but not to get it "dynamic" with a parameter ? Let me know if i'm not clear enough. DB

As i said, i expect to display the image only if a parameter that i'll will defined (0 or 1 for exemple), will let display the image or hide it.

2 Answers2

0

As far as I know there's no parameter in the ZPL language that allows to display or hide any type of field.

The only solution I can think about is to add the ^FX command before the image you want to hide, so the image will be commented and not printed.

Have a look here for more info https://www.zebra.com/content/dam/zebra_new_ia/en-us/manuals/printers/common/programming/zpl-zbi2-pm-en.pdf#page=205

ZRep
  • 138
  • 1
  • 9
0

after discussing wtih my collegue, we are not using "^FO" , please give a look to the attached fil line 230.

So we managed to replace the "^FO" command by a tag generated by our code, and it works. If we send "^FO" at the beginning of the line, the image is displayed, and if we don't send it, the image is hidden. Indeed no need to use "^FX" to hide...

Cheers David

  • well, if you send ZPL code with the wrong syntax (in your case, by not sending the ^FO command, you're not declaring the field), you get the same result of course. Much less elegant, but if it works that's ok I assume – ZRep Mar 17 '23 at 07:33