@check_page<EOL><INDENT>def interleaved2of5(self, txt, x, y, w=<NUM_LIT:1.0>, h=<NUM_LIT>):<DEDENT>
narrow = w / <NUM_LIT><EOL>wide = w<EOL>bar_char={'<STR_LIT:0>': '<STR_LIT>', '<STR_LIT:1>': '<STR_LIT>', '<STR_LIT:2>': '<STR_LIT>', '<STR_LIT:3>': '<STR_LIT>',<EOL>'<STR_LIT:4>': '<STR_LIT>', '<STR_LIT:5>': '<STR_LIT>', '<STR_LIT>': '<STR_LIT>', '<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>', '<STR_LIT>': '<STR_LIT>', '<STR_LIT:A>': '<STR_LIT>', '<STR_LIT>': '<STR_LIT>'}<EOL>self.set_fill_color(<NUM_LIT:0>)<EOL>code = txt<EOL>if len(code) % <NUM_LIT:2> != <NUM_LIT:0>:<EOL><INDENT>code = '<STR_LIT:0>' + code<EOL><DEDENT>code = '<STR_LIT>' + code.lower() + '<STR_LIT>'<EOL>for i in range(<NUM_LIT:0>, len(code), <NUM_LIT:2>):<EOL><INDENT>char_bar = code[i]<EOL>char_space = code[i+<NUM_LIT:1>]<EOL>if not char_bar in bar_char.keys():<EOL><INDENT>raise RuntimeError ('<STR_LIT>' % char_bar)<EOL><DEDENT>if not char_space in bar_char.keys():<EOL><INDENT>raise RuntimeError ('<STR_LIT>' % char_space)<EOL><DEDENT>seq = '<STR_LIT>'<EOL>for s in range(<NUM_LIT:0>, len(bar_char[char_bar])):<EOL><INDENT>seq += bar_char[char_bar][s] + bar_char[char_space][s]<EOL><DEDENT>for bar in range(<NUM_LIT:0>, len(seq)):<EOL><INDENT>if seq[bar] == '<STR_LIT:n>':<EOL><INDENT>line_width = narrow<EOL><DEDENT>else:<EOL><INDENT>line_width = wide<EOL><DEDENT>if bar % <NUM_LIT:2> == <NUM_LIT:0>:<EOL><INDENT>self.rect(x, y, line_width, h, '<STR_LIT:F>')<EOL><DEDENT>x += line_width<EOL><DEDENT><DEDENT>
Barcode I2of5 (numeric), adds a 0 if odd lenght