Page 148 - ZPL II Programming Guide
P. 148

128    ZPL Commands
                ~DG


                               Examples • These are some example related to the ~DG command:

                               To determine the t parameter use this formula:

                                                          xz   yz =   totalbytes
                                                          ------ ×
                                                           8


                               To determine the correct t parameter for a graphic 8 mm wide, 16 mm high, and a print
                               density of 8 dots/mm, use this formula:





                                                               8 ×  128 =  1024
                                                  ?     ?           t =  1024



                               Raise any portion of a byte to the next whole byte.

                               To determine the w parameter (the width in terms of bytes per row) use this formula:





                                                         ?  w =  8
                                                            ?


                               To determine the correct w parameter for a graphic 8 mm wide and a print density of 8
                               dots/mm, use this formula:






                                                       ?    w =  8
                                                             ?

                               Raise any portion of a byte to the next whole byte.

                               Parameter w is the first value in the t calculation.

                               The data parameter is a string of hexadecimal numbers sent as a representation of the graphic
                               image. Each hexadecimal character represents a horizontal nibble of four dots. For example,
                               if the first four dots of the graphic image are white and the next four black, the dot-by-dot
                               binary code is 00001111. The hexadecimal representation of this binary value is 0F. The
                               entire graphic image is coded in this way, and the complete graphic image is sent as one
                               continuous string of hexadecimal values.












               45541L-004 Rev. A                    ZPL II Programming  Guide                           9/15/06
   143   144   145   146   147   148   149   150   151   152   153