mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-12 03:14:32 +02:00
Added support for Code128 barcode.
This commit is contained in:
parent
c58b36e9c5
commit
f64910374f
5 changed files with 14 additions and 5 deletions
|
@ -50,14 +50,15 @@ class BarcodeGenerator
|
|||
case 'code93':
|
||||
$type = 'C93';
|
||||
break;
|
||||
case 'code128':
|
||||
$type = 'C128A';
|
||||
break;
|
||||
case 'none':
|
||||
return null;
|
||||
default:
|
||||
throw new \InvalidArgumentException('Unknown label type!');
|
||||
}
|
||||
|
||||
|
||||
|
||||
$bobj = $barcode->getBarcodeObj($type, $this->getContent($options, $target));
|
||||
|
||||
return $bobj->getSvgCode();
|
||||
|
@ -71,6 +72,7 @@ class BarcodeGenerator
|
|||
return $this->barcodeContentGenerator->getURLContent($target);
|
||||
case 'code39':
|
||||
case 'code93':
|
||||
case 'code128':
|
||||
return $this->barcodeContentGenerator->get1DBarcodeContent($target);
|
||||
case 'none':
|
||||
return null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue