' . "\n";
// print barcode elements
$y = 0;
// for each row
for ($r = 0; $r < $this->barcode_array['num_rows']; ++$r) {
$x = 0;
// for each column
for ($c = 0; $c < $this->barcode_array['num_cols']; ++$c) {
if ($this->barcode_array['bcode'][$r][$c] == 1) {
// draw a single barcode cell
$html .= '
' . "\n";
}
$x += $w;
}
$y += $h;
}
$html .= '
' . "\n";
return $html;
}
/**
* Return a PNG image representation of barcode (requires GD or Imagick library).
*