barcode
barcode copied to clipboard
`getBarcodePNG` sometimes adds `%` at the end
We are using this code to generate and save the barcode png image.
$barcodeIdentifier = 'box$123456$'
$barcodeFormat = 'C39+';
$barcodeEncoded = DNS1D::getBarcodePNG($barcodeIdentifier, $barcodeFormat);
$barcode = base64_decode($barcodeEncoded);
$this->entity
->addMediaFromString($barcode)
->usingFileName('identifier.png')
->toMediaCollection('barcodes');
When we scan it back it returns box$123456$%