Hello,
I'm trying to get a handle on code 128 barcodes.  I need to have a 
barcode that is of the format:
Start Code 128 Subset B 1ABC Shift to Subset C 123456789012345678901234 
EndCode128

I realize that iText will automatically 'figure out' the best way to do 
a 128 barcode, however I need to be able to specify it.  From reading 
the API, I believe I can, but I don't think I'm doing it correctly, as I 
get a barcode that doesn't seem to scan.  If I am doing it correctly - 
code-wise - but it still doesn't scan, that's a different issue.

Here is what I have so far:

...
PdfContentByte cb = writer.getDirectContent();
Barcode128 code 128 = new Barcode128();
code128.setCodeType(Barcode128.CODE128_RAW);
code128.setCode(Barcode128.START_B + "1ABC" + Barcode128.START_C + 
"123456789012345678901234");
code128.setBarHeight(72);
Image barcode128 = code128.createImageWithBarcode(cb,null, null);
PdfPCell c11 = new PdfPCell(new Phrase(new Chunk(barcode128, 0, 0));
...

Is that the correct way to specify when the subsets occur?

Regards,
 - James

-- 
James Asher
IT Director, XTEC Inc.
(913) 829-3773 x 115
(800) 898-9832
[EMAIL PROTECTED]


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to