Hello to everybody,
I'm quiet new in ZPL programming, I would appreciate if somebody could help me to clarify if is there any ZPL syntax to keep a datamatrix bar code fixed dimension if the data encoded may vary from 100 to 800 characters.
The solution that I found is to increase/decrease the dimensional height of individual symbol elements (h value of ^BXo,h,s,c,r,f,g,a command), but needed extra coding.
I used the following ZPL code to print the datamatrix:
^XA
^BY0,0^FT20,450^BXN,7,200,0,0,1,~^FH^FD0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789^FS^XZ
Thanks and regards.
Levi.
Fixed datamatrix barcode dimension with variable encoded data// Expert user has replied. |
1 Replies
Unfortunately there is no ZPL syntax that can keep a Data Matrix bar code at a fixed dimension if the data encoded may vary. The link below shows how the dimensions are determined but the only way to keep the bar code at a fixed size is to manually change parameters of ^BX as the data increases. This link would help to calculate expected size.
https://support.zebra.com/cpws/docs/general/bxcapacity.htm
You can also use ZebraDesigner software to visually see the changes in size of a Data Matrix bar code as characters are added but also how the size can be reduced changing the X and Y expansion factor values. Then print file to capture the ZPL.
It is doubtful that you will be able to maintain one size at a range of 100 to 800 characters and maintain scan ability.