tecnickcom / TCPDF

Official clone of PHP library to generate PDF documents and barcodes
https://tcpdf.org
Other
4.12k stars 1.51k forks source link

Case of incorrect 1D barcode (CODE11) #209

Open Lucas286 opened 4 years ago

Lucas286 commented 4 years ago

I'm using a library to generate CODE11 barcodes. I have one case where the barcode is generated incorrectly. This case is a series of numbers: 218980415346 The generated barcode has the wrong last STOP character. The barcode is generated:

$style = array(
        'position' => '',
        'align' => 'C',
        'stretch' => false,
        'fitwidth' => true,
        'cellfitalign' => 'C',
        'border' => true,
        'hpadding' => 'auto',
        'vpadding' => 'auto',
        'fgcolor' => array(0,0,0),
        'bgcolor' => false, //array(255,255,255),
        'text' => false,
        'font' => 'dejavusans',
        'fontsize' => 12,
        'stretchtext' => 4
    );

$pdf->write1DBarcode('218980415346', 'CODE11', '', '', '', 25, 0.6, $style, 'N');
Lucas286 commented 4 years ago

fixed

227