diff --git a/application/Espo/Core/Htmlizer/Htmlizer.php b/application/Espo/Core/Htmlizer/Htmlizer.php
index 877bd63151..f262006447 100644
--- a/application/Espo/Core/Htmlizer/Htmlizer.php
+++ b/application/Espo/Core/Htmlizer/Htmlizer.php
@@ -339,32 +339,55 @@ class Htmlizer
"UPCE" => 'UPCE',
"ITF14" => 'I25',
"pharmacode" => 'PHARMA',
+ "QRcode" => 'QRCODE,H',
];
- $params = [
- $value,
- $typeMap[$codeType] ?? null,
- '', '',
- $context['hash']['width'] ?? 60,
- $context['hash']['height'] ?? 30,
- 0.4,
- [
- 'position' => 'S',
- 'border' => false,
- 'padding' => $context['hash']['padding'] ?? 0,
- 'fgcolor' => $context['hash']['color'] ?? [0,0,0],
- 'bgcolor' => $context['hash']['bgcolor'] ?? [255,255,255],
- 'text' => $context['hash']['text'] ?? true,
- 'font' => 'helvetica',
- 'fontsize' => $context['hash']['fontsize'] ?? 14,
- 'stretchtext' => 4,
- ],
- 'N',
- ];
+ if ($codeType === 'QRcode') {
+ $function = 'write2DBarcode';
+ $params = [
+ $value,
+ $typeMap[$codeType] ?? null,
+ '', '',
+ $context['hash']['width'] ?? 40,
+ $context['hash']['height'] ?? 40,
+ [
+ 'border' => false,
+ 'vpadding' => $context['hash']['padding'] ?? 2,
+ 'hpadding' => $context['hash']['padding'] ?? 2,
+ 'fgcolor' => $context['hash']['color'] ?? [0,0,0],
+ 'bgcolor' => $context['hash']['bgcolor'] ?? false,
+ 'module_width' => 1,
+ 'module_height' => 1,
+ ],
+ 'N',
+ ];
+ } else {
+ $function = 'write1DBarcode';
+ $params = [
+ $value,
+ $typeMap[$codeType] ?? null,
+ '', '',
+ $context['hash']['width'] ?? 60,
+ $context['hash']['height'] ?? 30,
+ 0.4,
+ [
+ 'position' => 'S',
+ 'border' => false,
+ 'padding' => $context['hash']['padding'] ?? 0,
+ 'fgcolor' => $context['hash']['color'] ?? [0,0,0],
+ 'bgcolor' => $context['hash']['bgcolor'] ?? [255,255,255],
+ 'text' => $context['hash']['text'] ?? true,
+ 'font' => 'helvetica',
+ 'fontsize' => $context['hash']['fontsize'] ?? 14,
+ 'stretchtext' => 4,
+ ],
+ 'N',
+ ];
+ }
$paramsString = urlencode(json_encode($params));
- return new LightnCandy\SafeString("