[reportlab-users] Problem with Numeric Barcodes

Robin Becker robin at reportlab.com
Fri Jun 9 08:45:14 EDT 2006


Ed Everson wrote:
> Robin,
> 
> Sorry for emailing directly, was not sure if attachments would go via
> the board.
> 
> Attached document demonstrates the difference between expected and
> received results for a barcode of 06635018.
> 
> Regards,
> 
> Ed


Ed, I plugged in our reader and it read both those codes correctly as 06635018 
when printed from your document. The top version is different I think because Ty 
Sarna who contributed the code started in Code B by default. For purely numeric 
codes it might be better to start in Code C. However, I think Ty did allow for 
an optimization in which trailing digits are converted to Code C. In this case 
we need only three symbols to represent three pairs of digits.

I attach a PDF indicating some output for 06635018A and 06635018 showing the big 
difference in the coding efficiency when using the C coding for pairs of digits. 
Ty's optimization fails for the one ending with A so we get a 60% longer bar for 
just one extra character. Your version seems to be similar to the one which is 
encoded in B; the algorithm starts in B and never has to leave and the Code C 
optimization never takes place because of the 'A' at the end. Both A and B 
codings are the same for digits.

I still can't actually prove that this stuff is right without a lot of effort, 
but has anyone else tried the barcode stuff?
-- 
Robin Becker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: code128.pdf
Type: application/pdf
Size: 3099 bytes
Desc: not available
Url : http://two.pairlist.net/pipermail/reportlab-users/attachments/20060609/acc0b01d/code128.pdf


More information about the reportlab-users mailing list