sephiroth74/purePDF — pull request #1 by jkronstat (2013-07-08 18:26:09+00:00)
Title: CODE39 Barcode Support

Added support for barcode symbology "CODE39", a variable length alphanumeric code.

http://en.wikipedia.org/wiki/Code_39

Code39 supports 1-0, A-Z, .$/+%+ and SPACE

Each character consists of 5 bars and 4 spaces. 3 of the 9 elements (including spaces) are wide in each character.
Ratio between wide and narrow elements: 3:1

Usage:

var bcode:Barcode = new BarcodeCODE39;
bcode.code = "123";
bcode.codeType = BarcodeCODE39;

var p:Paragraph = = new Paragraph("");

var cb : PdfContentByte = document.getDirectContent();
p.add(Chunk.fromImage(bcode.createImageWithBarcode(cb,null,null), 0, -5));
document.add(p);

This patch should not affect existing users.