SetFont('Arial','',10); $this->Text($xpos, $ypos + $height + 4, $code); $this->SetFillColor(0); // add start and stop codes $code = 'AA'.strtolower($code).'ZA'; for($i=0; $iError('Invalid character in barcode: '.$charBar); } if(!isset($barChar[$charSpace])){ $this->Error('Invalid character in barcode: '.$charSpace); } // create a wide/narrow-sequence (first digit=bars, second digit=spaces) $seq = ''; for($s=0; $sRect($xpos, $ypos, $lineWidth, $height, 'F'); } $xpos += $lineWidth; } } } } ?>