tecnickcom/tc-lib-barcode

Right way to generate a GS1-128 barcode

cheoAlejo opened this issue · 2 comments

This is just a question. I'm trying to generate this codebar:

image

Is this the right way to do it ?

$gs1Number = '7709998943619';
$paymentNumber = '0118000008';
$amountToPay = '0030000000';
$maxPayDate = '20180626';
$data = "415{$gs1Number}8020{$paymentNumber}3900{$amountToPay}96{$maxPayDate}";
$barcode = new \Com\Tecnick\Barcode\Barcode();
$bobj = $barcode->getBarcodeObj('C128C', $data, 450, 70, 'black', array(0, 0, 0, 0));

I managed to do it.

Are you able to share how you made it work?