Is it possible to set an exact width for a DataMatrix barcode?

// Expert user has replied.
M Mingliang Huang 6 months ago
105 3 0


Recently, we got a development requirement with our ZD420 printer. 

The production line has requested that the DataMatrix barcode be printed with dimensions precisely 12mm x 12mm. 

Upon investigation, we found that the printer can only print a whole number of dots, which makes it impossible to set an exact size for the DataMatrix. 

It's possible that our investigation was incorrect, 

so we're seeking expert advice. thanks a lot.

Is there a way to set an exact printing size for the DataMatrix, such as 12x12 mm, 13x13 mm, etc.? 

Below is our printing command for reference.

^XA
^FO10,10
^BXN,6,200,24,24
^FD2325500336USN2HCWOJ03ASA0115369390000000002^FS
^XZ

 

Please Register or Login to post a reply

3 Replies

S Steven Si

The dimension of a DataMatrix barcode (^BX command in ZPL) cannot be precisely specified in ZPL. The dimension can approximately match with 12mm x 12mm with the following ZPL, by changing the module dimension from 6 to 4.

^XA
^FO10,10
^BXN,4,200,24,24
^FD2325500336USN2HCWOJ03ASA0115369390000000002^FS
^XZ
M Mingliang Huang

I got it, thanks a lot.

J Jessica Wade

To print a DataMatrix barcode with precise dimensions on your ZD420 printer, you need to adjust the barcode size in dots according to the printer's DPI (dots per inch).

  1. Determine Printer DPI: Find out if your printer is 203, 300, or 600 DPI.
  2. Calculate Dots for 12mm:
    • For 203 DPI: 12mm ≈ 96 dots
    • For 300 DPI: 12mm ≈ 142 dots
    • For 600 DPI: 12mm ≈ 283 dots
  3. Adjust ZPL Command:
    • For 203 DPI:

      Copy code

      ^XA ^FO10,10 ^BXN,8,96 ^FD2325500336USN2HCWOJ03ASA0115369390000000002^FS ^XZ

    • For 300 DPI:

      Copy code

      ^XA ^FO10,10 ^BXN,12,142 ^FD2325500336USN2HCWOJ03ASA0115369390000000002^FS ^XZ

    • For 600 DPI:

      Copy code

      ^XA ^FO10,10 ^BXN,24,283 ^FD2325500336USN2HCWOJ03ASA0115369390000000002^FS ^XZ

Adjust the ^BXN parameters (module height and symbol size) based on your printer's DPI to achieve the desired 12mm x 12mm size.

CONTACT
Can’t find what you’re looking for?