SetFont('Arial','',10); $this->Text($xpos, $ypos + $height + 4, $code); $this->SetFillColor(0); $code = '*'.strtoupper($code).'*'; for($i=0; $iError('Invalid character in barcode: '.$char); } $seq = $barChar[$char]; for($bar=0; $bar<9; $bar++){ if($seq[$bar] == 'n'){ $lineWidth = $narrow; }else{ $lineWidth = $wide; } if($bar % 2 == 0){ $this->Rect($xpos, $ypos, $lineWidth, $height, 'F'); } $xpos += $lineWidth; } $xpos += $gap; } } } ?>