0

Can I print a GTIN-14 barcode using ZPL? I have searched, but can't find much information on weather or not it is possible to print this type of bar code, including the border around it.

Any help is greatly appreciated.

Thanks!

1 Answer 1

3

GTIN-14 is simply an interleaved 2 of 5 barcode with bearer bars and special text formatting. Assuming a 203dpi printer and an approximate x-dimension of 25 mils (.64mm), you can calculate all the dimensions of the barcode and its border box.

  • 25mils is approximately 5 dots at 203dpi.
  • The barcode height should be 1.25 inches, which is ~250 dots.
  • The border around the barcode should be the width of the wide bar (3x narrow, or 15 dots).
  • Each character in the barcode is 45 dots (9 modules * 5 dots).
  • The start/stop also adds 45 dots (9 modules * 5 dots).
  • So the total length of the barcode is 15 * 45 dots = 675 dots.
  • Quite zone is 0.25 inches (50 dots) left and right of the barcode.
  • So the box around the barcode is 805 dots wide (15 border + 50 quiet + 675 barcode + 50 quiet + 15 border) and 280 dots high (15 border + 250 barcode + 15 border).

Here's how it looks in ZPL:

^XA
^FO100,100^BY5,3
^B2N,250,N,N,N
^FD00012345678905^FS
^FO35,85^GB805,280,15^FS
^FO115,380^AB,44,28^FD0 00 12345 67890 5^FS
^XZ

The top left corner of the barcode is at 100,100. The top left corner of the border box is at 35,85.

The example uses the built-in B font, you may want to change that...

And here it is in labelary.

Sign up to request clarification or add additional context in comments.

1 Comment

Note that it's common to request the data carrier (symbology) to be GS1-128, under a single GTIN identifier. So that the example becomes (01)0001234567890. ALSO notice that you should NOT transfer the 14th digit. The format is 13+1 = 14. Be careful here, because ZPL truncates on the left side.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.