1 Reply Latest reply on Aug 30, 2017 9:53 AM by Steven Si

    printing png with ^GF command (C# app)

    Karol Jasinski

      Hi,

      I'm writing small app which convert PDF files int PNG and then stuff it into ZPL. My printer is industrial ZE500, which is not accepting anything else then ZPL.

      So far, I'm able to achieve this by converting PNG into hexadecimal and use it with ~DY command but when it comes to printing, it works slow. I want to send my bitmap using ^GF command, but example i have of working ^GF use non-hexadecimal representation which i can't figure out what it is (it looks like "...,mUFC8mT04:::8I0F30060E19F0FCI03..." )

      When i try to use my hex with ^GF it shows something what looks like noise or snow.

      What are, step by step, best methods to use png inside ^GF? or maybe png is not proper format for this? What exactly shoul i do with PNG file?

        • Re: printing png with ^GF command (C# app)
          Steven Si

          ^GF command accepts three types of compression: A - ASCII hexadecimal, B - binary, C - compressed binary. Your working example of  ^GF may uses ^GFB or ^GFC compression. That might be the reason we see something of "...,mUFC8mT04:::8I0F30060E19F0FCI03..."

           

          If we want to use ^GF to print an image, the image needs to be converted to one of the three types mentioned above. Following is an example code I created to print out "Zebra" image. I saved "Zebra" image in *.JPG file via Windows Snipping Tool. Then coverted the *.JPG to ASCII Hexmal using online free tool, such as Generate Ascii Hex Representation for Zebra Printer Online. Then copied the hex data into ^GFA command. Hope this helps.

           

          ^XA

          ^FO100,100^GFA,2580,2580,030,00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007F8000000000000000000000000000000000000000000000000000000001FFE000000000000000000000000000000000000000000000000000000001FFE000000000000000000000000000000000000000000000000000000001FFE000000000000000000000000000000001FFFFFFFFF000000000000001FFE000000000000000000000000000000003FFFFFFFFF800000000000001FFE000000000000000000000000000000003FFFFFFFFF800000000000001FFE000000000000000000000000000000003FFFFFFFFF800000000000001FFE000000000000000000000000000000003FFFFFFFFFC00000000000001FFE000000000000000000000000000000003FFFFFFFFF800000000000001FFE000000000000000000000000000000003FFFFFFFFF800000000000001FFE000000000000000000000000000000003FFFFFFFFF800000000000001FFE000000000000000000000000000000001FFFFFFFFF800000000000001FFE000000000000000000000000000000001FFFFFFFFF800000000000001FFE000000000000000000000000000000000000001FFF800000000000001FFE000000000000000000000000000000000000001FFF000000000000001FFE000000000000000000000000000000000000003FFF000000000000001FFE000000000000000000000000000000000000007FFE000000000000001FFE000000000000000000000000000000000000007FFE000000000000001FFE00000000000000000000000000000000000000FFFC0000007FF000001FFE00FF80000000007E00000FFF00000000000000FFF8000007FFFE00001FFE07FFE00000FF01FF8000FFFFF0000000000001FFF800001FFFFF80001FFE1FFFF80001FF83FF8007FFFFFC000000000003FFF000007FFFFFC0001FFE3FFFFC0001FF8FFF801FFFFFFE000000000003FFE00000FFFFFFF0001FFE7FFFFF0001FF8FFFC03FFFFFFF800000000007FFE00001FFFFFFF8001FFFFFFFFF0001FF9FFF807FFFFFFF80000000000FFFC00003FFFFFFFC001FFFFFFFFF8001FFBFFF807FFFFFFFC0000000000FFFC00007FFFFFFFC001FFFFFFFFFC001FFFFFF807FFFFFFFE0000000001FFF800007FFC07FFE001FFFFFFFFFC001FFFFFF807FFFFFFFE0000000003FFF00000FFF001FFE001FFFFFFFFFE001FFFFFF807FF007FFE0000000003FFF00001FFE000FFF001FFFFC0FFFE001FFFFFF807F8003FFF0000000007FFE00001FFC0007FF001FFFF007FFF001FFFF83807C0001FFF0000000007FFC00003FFC0007FF801FFFE003FFF001FFFE0000700000FFF000000000FFFC00003FF80003FF801FFFC001FFF001FFFC0000000000FFF000000001FFF800003FF80003FF801FFF8001FFF001FFF800000000007FF000000001FFF800003FF80003FF801FFF0000FFF801FFF000000000007FF000000003FFF000007FF80003FF801FFE0000FFF801FFF000000000007FF000000007FFE000007FF00003FF801FFE0000FFF801FFE000000000007FF000000007FFE000007FFFFFFFFF801FFE00007FF801FFE000000000007FF00000000FFFC000007FFFFFFFFF801FFE00007FF801FFC000000000007FF00000000FFF8000007FFFFFFFFF801FFE00007FF801FFC000000007FFFFF00000001FFF8000007FFFFFFFFF801FFE00007FF801FFE0000000FFFFFFF00000003FFF0000007FFFFFFFFF801FFE00007FF801FFC0000007FFFFFFF00000003FFE0000007FFFFFFFFF801FFE00007FF801FFC000000FFFFFFFF00000007FFE0000007FFFFFFFFF801FFE00007FF801FFC000003FFFFFFFF0000000FFFC0000007FFFFFFFFF001FFE00007FF801FFC000007FFFFFFFF0000000FFFC0000007FF0000000001FFE00007FF801FFC00000FFFFFFFFF0000001FFF80000007FF8000000001FFE00007FF801FFC00000FFFE007FF0000003FFF00000007FF8000000001FFE00007FF801FFC00001FFF0007FF0000003FFF00000007FF8000000001FFE0000FFF801FFC00001FFE0007FF0000007FFE00000007FF8000000001FFE0000FFF801FFC00003FFC0007FF0000007FFC00000007FF8000000001FFF0000FFF001FFC00003FFC0007FF000000FFFC00000007FFC000000001FFF8001FFF001FFC00003FFC0007FF000001FFF800000003FFC000000001FFFC001FFF001FFC00003FFC0007FF000001FFF800000003FFE000000001FFFE003FFF001FFC00003FFC000FFF000003FFF000000003FFF00000E001FFFF007FFE001FFC00003FFC001FFF000003FFFFFFFFFC01FFF80003E001FFFFC1FFFE001FFC00003FFC003FFF000003FFFFFFFFFC01FFFF003FF001FFFFFFFFFC001FFC00003FFE007FFF000003FFFFFFFFFE00FFFFFFFFE001FFFFFFFFFC001FFC00001FFF81FFFF000007FFFFFFFFFE007FFFFFFFE001FFFFFFFFF8001FFC00001FFFFFFFFF000007FFFFFFFFFE007FFFFFFFE001FFBFFFFFF8001FFC00000FFFFFFFFF000007FFFFFFFFFE003FFFFFFFE001FF9FFFFFF0001FFC00000FFFFFFFFF000003FFFFFFFFFE001FFFFFFFE001FF8FFFFFE0001FFC000007FFFFF9FF000003FFFFFFFFFE0007FFFFFFE001FF87FFFFC0001FFC000003FFFFF1FF000003FFFFFFFFFC0001FFFFFF8001FF81FFFF00001FFC000000FFFFC1FF000001FFFFFFFFFC00007FFFFC0000FF00FFFC00000FF80000007FFF01FE0000000000000000000007FF80000000001FF00000000000000007F8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

          ^XZ