I can generate a UPC code with no problem when I supply the check digit with
the barcode string.

 

Does iTextSharp supply a check digit if requested?  I can see the
GenerateCheckDigit property, but it seems to have no effect when I put it
either before or after like this:

 

        Dim upc As BarcodeEAN = New BarcodeEAN

        upc.CodeType = Barcode.UPCA

 

        upc.GenerateChecksum = true

        upc.Code = "05117800093"

        ' or here upc.GenerateChecksum = true

 

        Dim imgUPC = upc.CreateImageWithBarcode(writer.DirectContent,
Color.BLACK, Color.BLACK)

        para.Add(New Phrase(New Chunk(imgUPC, 0, 0)))

 

Also when the checksum is supplied AND it is incorrect, the barcode is
generated anyway.  It would probably be better to throw an error in this
case.

 

Thanks,

 

Rick

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to