tecnickcom/tc-lib-barcode

Can't get the right IMB output

mkasson opened this issue · 1 comments

As described here: http://stackoverflow.com/questions/5089511/how-to-generate-intelligent-mail%C2%AE-barcode-onecode-via-php

I'm having trouble with this library. It doesn't generate the same IMB as stamps.com or as this online generator: bobcodes.weebly.com/imb.html or as this online generator: http://generator.onbarcode.com/online-intelligent-mail-onecode-barcode-generator.aspx

Code used:
$bobj = $barcode->getBarcodeObj('IMB', $imbBarcode, -4, -11, 'black', array(2, 2, 2, 2));
$newBarcode = $bobj->getGd();
imagecopy($finalImage, $newBarcode, 975, 390, 0,0, 665, 65);

Here's a comparison. The upper bar code is what tc-lib generates. The lower bar code is what stamps.com and those two other links I gave generates. These are for 0004089956453869648007724.

Many thanks!
imb output comparison 2016-05-28 00-57-03

I see. The documentation for a protected function in the TCPDF barcode class mentions that the zip code must be separated from the rest by a '-'. http://www.tcpdf.org/doc/code/classTCPDFBarcode.html#aa537d2477c49911adbd265f70a3c523f