Hi everyone, I'm using iTextSharp 4.1.2.0 and I try to create an EAN-13 barcode (actually EAN-13 with EAN-5 supplement) and want iText to automatically calculate the checksum.
I would like to use code like the following: ------------------------------------------------------------------- BarcodeEAN ean13 = new BarcodeEAN(); ean13.CodeType = BarcodeEAN.EAN13; ean13.Code = "1234567890123"; //this works ean13.Code = "123456789012"; //this does not work ean13.GenerateChecksum = true; //seems to be ignored BarcodeEAN ean5 = new BarcodeEAN(); ean5.CodeType = BarcodeEAN.SUPP5; ean5.Code = "12345"; BarcodeEANSUPP barcode = new BarcodeEANSUPP(ean13, ean5); Image barcodeImage = barcode.CreateImageWithBarcode(cb, null, null); ------------------------------------------------------------------- When I supply the checksum, the barcode is created. When I leave out the checksum during barcode creation an exception "index out of range" is thrown. Setting the "GenerateChecksum" member does not seem to have any effect. What must I do to let iTextSharp calculate the checksum? Thanks in advance! Markus ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php
