Skip to content

Commit

Permalink
Fixed problems with S25 barcode (#611)
Browse files Browse the repository at this point in the history
This was already fixed in tc-lib-barcode.
  • Loading branch information
theonlytruth committed Sep 6, 2023
1 parent b142eba commit 26d2eed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tcpdf_barcodes_1d.php
Expand Up @@ -828,7 +828,7 @@ protected function barcode_s25($code, $checksum=false) {
$chr['5'] = '11101011101010';
$chr['6'] = '10111011101010';
$chr['7'] = '10101011101110';
$chr['8'] = '10101110111010';
$chr['8'] = '11101010111010';
$chr['9'] = '10111010111010';
if ($checksum) {
// add checksum
Expand All @@ -838,7 +838,7 @@ protected function barcode_s25($code, $checksum=false) {
// add leading zero if code-length is odd
$code = '0'.$code;
}
$seq = '11011010';
$seq = '1110111010';
$clen = strlen($code);
for ($i = 0; $i < $clen; ++$i) {
$digit = $code[$i];
Expand All @@ -848,7 +848,7 @@ protected function barcode_s25($code, $checksum=false) {
}
$seq .= $chr[$digit];
}
$seq .= '1101011';
$seq .= '111010111';
$bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
return $this->binseq_to_array($seq, $bararray);
}
Expand Down

0 comments on commit 26d2eed

Please sign in to comment.