' . PHP_EOL;
+
+ $positionHorizontal = 0;
+ /** @var BarcodeBar $bar */
+ foreach ($barcodeData->getBars() as $bar) {
+ $barWidth = $bar->getWidth() / $barcodeData->getWidth() * 100;
+ $barHeight = round(($bar->getHeight() / $barcodeData->getHeight() * 100), 3);
+
+ if ($bar->isBar() && $barWidth > 0) {
+ $positionVertical = round(($bar->getPositionVertical() / $barcodeData->getHeight() * 100), 3);
+
+ // draw a vertical bar
+ $html .= '
' . PHP_EOL;
+ }
+
+ $positionHorizontal += $barWidth;
+ }
+
+ $html .= '
' . PHP_EOL;
+
+ return $html;
+ }
+}
diff --git a/vendor/picqer/php-barcode-generator/src/BarcodeGeneratorHTML.php b/vendor/picqer/php-barcode-generator/src/BarcodeGeneratorHTML.php
new file mode 100644
index 0000000..75a98fe
--- /dev/null
+++ b/vendor/picqer/php-barcode-generator/src/BarcodeGeneratorHTML.php
@@ -0,0 +1,44 @@
+getBarcodeData($barcode, $type);
+
+ $html = '' . PHP_EOL;
+
+ $positionHorizontal = 0;
+ /** @var BarcodeBar $bar */
+ foreach ($barcodeData->getBars() as $bar) {
+ $barWidth = round(($bar->getWidth() * $widthFactor), 3);
+ $barHeight = round(($bar->getHeight() * $height / $barcodeData->getHeight()), 3);
+
+ if ($bar->isBar() && $barWidth > 0) {
+ $positionVertical = round(($bar->getPositionVertical() * $height / $barcodeData->getHeight()), 3);
+
+ // draw a vertical bar
+ $html .= '
' . PHP_EOL;
+ }
+
+ $positionHorizontal += $barWidth;
+ }
+
+ $html .= '
' . PHP_EOL;
+
+ return $html;
+ }
+}
diff --git a/vendor/picqer/php-barcode-generator/src/BarcodeGeneratorJPG.php b/vendor/picqer/php-barcode-generator/src/BarcodeGeneratorJPG.php
new file mode 100644
index 0000000..0e33d70
--- /dev/null
+++ b/vendor/picqer/php-barcode-generator/src/BarcodeGeneratorJPG.php
@@ -0,0 +1,22 @@
+newImage($width, $height, 'white', 'JPG');
+
+ return $image;
+ }
+
+ protected function generateGdImage($image)
+ {
+ imagejpeg($image);
+ imagedestroy($image);
+ }
+}
diff --git a/vendor/picqer/php-barcode-generator/src/BarcodeGeneratorPNG.php b/vendor/picqer/php-barcode-generator/src/BarcodeGeneratorPNG.php
new file mode 100644
index 0000000..150e1e4
--- /dev/null
+++ b/vendor/picqer/php-barcode-generator/src/BarcodeGeneratorPNG.php
@@ -0,0 +1,121 @@
+useImagick = true;
+ } elseif (function_exists('imagecreate')) {
+ $this->useImagick = false;
+ } else {
+ throw new BarcodeException('Neither gd-lib or imagick are installed!');
+ }
+ }
+
+ /**
+ * Force the use of Imagick image extension
+ */
+ public function useImagick()
+ {
+ $this->useImagick = true;
+ }
+
+ /**
+ * Force the use of the GD image library
+ */
+ public function useGd()
+ {
+ $this->useImagick = false;
+ }
+
+ /**
+ * Return a PNG image representation of barcode (requires GD or Imagick library).
+ *
+ * @param string $barcode code to print
+ * @param BarcodeGenerator::TYPE_* $type (string) type of barcode
+ * @param int $widthFactor Width of a single bar element in pixels.
+ * @param int $height Height of a single bar element in pixels.
+ * @param array $foregroundColor RGB (0-255) foreground color for bar elements (background is transparent).
+ * @return string image data or false in case of error.
+ */
+ public function getBarcode(string $barcode, $type, int $widthFactor = 2, int $height = 30, array $foregroundColor = [0, 0, 0]): string
+ {
+ $barcodeData = $this->getBarcodeData($barcode, $type);
+ $width = round($barcodeData->getWidth() * $widthFactor);
+
+ if ($this->useImagick) {
+ $imagickBarsShape = new imagickdraw();
+ $imagickBarsShape->setFillColor(new imagickpixel('rgb(' . implode(',', $foregroundColor) .')'));
+ } else {
+ $image = $this->createGdImageObject($width, $height);
+ $gdForegroundColor = imagecolorallocate($image, $foregroundColor[0], $foregroundColor[1], $foregroundColor[2]);
+ }
+
+ // print bars
+ $positionHorizontal = 0;
+ /** @var BarcodeBar $bar */
+ foreach ($barcodeData->getBars() as $bar) {
+ $barWidth = round(($bar->getWidth() * $widthFactor), 3);
+
+ if ($bar->isBar() && $barWidth > 0) {
+ $y = round(($bar->getPositionVertical() * $height / $barcodeData->getHeight()), 3);
+ $barHeight = round(($bar->getHeight() * $height / $barcodeData->getHeight()), 3);
+
+ // draw a vertical bar
+ if ($this->useImagick) {
+ $imagickBarsShape->rectangle($positionHorizontal, $y, ($positionHorizontal + $barWidth - 1), ($y + $barHeight));
+ } else {
+ imagefilledrectangle($image, $positionHorizontal, $y, ($positionHorizontal + $barWidth - 1), ($y + $barHeight), $gdForegroundColor);
+ }
+ }
+ $positionHorizontal += $barWidth;
+ }
+
+ if ($this->useImagick) {
+ $image = $this->createImagickImageObject($width, $height);
+ $image->drawImage($imagickBarsShape);
+ return $image->getImageBlob();
+ }
+
+ ob_start();
+ $this->generateGdImage($image);
+ return ob_get_clean();
+ }
+
+ protected function createGdImageObject(int $width, int $height)
+ {
+ $image = imagecreate($width, $height);
+ $colorBackground = imagecolorallocate($image, 255, 255, 255);
+ imagecolortransparent($image, $colorBackground);
+
+ return $image;
+ }
+
+ protected function createImagickImageObject(int $width, int $height): Imagick
+ {
+ $image = new Imagick();
+ $image->newImage($width, $height, 'none', 'PNG');
+
+ return $image;
+ }
+
+ protected function generateGdImage($image)
+ {
+ imagepng($image);
+ imagedestroy($image);
+ }
+}
diff --git a/vendor/picqer/php-barcode-generator/src/BarcodeGeneratorSVG.php b/vendor/picqer/php-barcode-generator/src/BarcodeGeneratorSVG.php
new file mode 100644
index 0000000..4d0d477
--- /dev/null
+++ b/vendor/picqer/php-barcode-generator/src/BarcodeGeneratorSVG.php
@@ -0,0 +1,59 @@
+getBarcodeData($barcode, $type);
+
+ // replace table for special characters
+ $repstr = [
+ "\0" => '',
+ '&' => '&',
+ '<' => '<',
+ '>' => '>',
+ ];
+
+ $width = round(($barcodeData->getWidth() * $widthFactor), 3);
+
+ $svg = '' . PHP_EOL;
+ $svg .= '' . PHP_EOL;
+ $svg .= '