The following samples show how to create a GS1 Data Matrix image through command line. The samples don't cover spool filter operation (e.g. for SAP).
Output in EPS format, GS1 Data Matrix marked by FNC1 on the first position, module width (dot size) of 0.508 mm
tbarcode -fPS -oBarcode.eps -b71 --DMformat=1 -eon -m0.508 -d"0112345678901231"
Output in GIF bitmap format, 300 dpi, same settings as above
tbarcode -fIMAGE -iGIF -oBarcode.gif -b71 --DMformat=1 -eon -m0.508 --dpi=300
-d"0112345678901231"
If you need to fit the module width to the pixel grid exactly, you can use the --optimalwidth parameter
tbarcode -fIMAGE -iGIF -oBarcode.gif -b71 --DMformat=1 -eon -m0.508 --dpi=300
--optimalwidth -d"0112345678901231"
For label printers with a resolution of 203 dpi (thermo transfer) you should adjust the module width for a 203 dpi grid.
tbarcode -fIMAGE -iGIF -oBarcode.gif -b71 --DMformat=1 -eon -m0.500493 --dpi=203
--optimalwidth -d"0112345678901231"
The FNC1 field separator (used for variable length fields) is inserted into the data string as \F. Eventually you have to encode it in the command line as \ or \\ (e.g. \\F).
tbarcode -fIMAGE -iGIF -oBarcode.gif -b71 --DMformat=1 -eon -m0.508 --dpi=300
-d"vvvvvv\Fnnnnnn" (v… data with variable length - use AI)
For inkjet printers you can reduce the bar width to avoid issues with blurred ink. For 10% reduction of the module width add:
--reduction=10 --reductionunit=perc
These examples use sample values for data matrix size (module width). Larger barcode symbols are possible and recommended for better readability. Just watch out for the correct settings according to the specifications of your printer (dpi, dot size).