diff --git a/tcpdf.php b/tcpdf.php index 7d967234..cf0b5f2d 100644 --- a/tcpdf.php +++ b/tcpdf.php @@ -15572,12 +15572,13 @@ public function write1DBarcode($code, $type, $x=null, $y=null, $w=null, $h=null, $this->setDrawColorArray($style['fgcolor']); $this->setTextColorArray($style['fgcolor']); // print bars + $style += ['bwr' => .0]; foreach ($arrcode['bcode'] as $k => $v) { $bw = ($v['w'] * $xres); if ($v['t']) { // draw a vertical bar $ypos = $y + $vpadding + ($v['p'] * $barh / $arrcode['maxh']); - $this->Rect($xpos, $ypos, $bw, ($v['h'] * $barh / $arrcode['maxh']), 'F', array(), $style['fgcolor']); + $this->Rect($xpos + ($style['bwr'] / 2), $ypos, $bw - $style['bwr'], ($v['h'] * $barh / $arrcode['maxh']), 'F', array(), $style['fgcolor']); } $xpos += $bw; }