Add UPC support to built-in barcode generator

This commit is contained in:
Martin Neubauer
2021-03-12 13:54:27 +01:00
parent 7b59a3ac2b
commit 5aaeb6742c
2 changed files with 62 additions and 6 deletions

View File

@@ -102,15 +102,15 @@ class modPhpbarcode extends ModeleBarCode
if ($encoding == 'ISBN') {
$supported = 1;
}
if ($encoding == 'UPC') {
$supported = 1;
}
// Formats that hangs on Windows (when genbarcode.exe for Windows is called, so they are not
// activated on Windows)
if (file_exists($genbarcode_loc) && empty($_SERVER["WINDIR"])) {
if ($encoding == 'EAN8') {
$supported = 1;
}
if ($encoding == 'UPC') {
$supported = 1;
}
if ($encoding == 'C39') {
$supported = 1;
}