mawo / barcode
Create 2D data matrix
dev-master / 1.0.x-dev
2020-05-11 19:52 UTC
Requires
- mawo/kkbarcode: ~1.0
This package is auto-updated.
Last update: 2025-04-12 06:57:50 UTC
README
Generate GS1 compatible Data Matrix with multiple code blocks divided by fnc1.
The only supported function is "getSvg()"
If you don't need multiple data blocks and want more features (e.g. other output formats) have a look at https://github.com/kreativekorp/barcode
Example:
$options=[
'gs1' => true,
'fnc1char' => '~',
'rect' => false,
];
$bc = new Mawo\Barcode\Encoder\DataMatrixEncoder;
$data = '~1234567890123456789012~ABC123DEFGHIJKLMNOP456789QRSTUVWXY~1234567890';
echo $bc->getSvg($data, $options);