3 of 9 barcodes using HTML5 canvas
3 of 9 bar codes consist of a set of 43 characters. This implementation doesn’t accommodate checksums and is Code 39 rather than “Full Code 39” and so doesn’t support lowercase letters.
Each character in a code 39 bar code is represented by 9 elements each of which can be a bar or space. The first and last characters of a bar code must be the asterisk character, and each character in a bar code (except the last) is followed by a terminating narrow space element.
This code creates a bar code of a specified character string as an HTML5 canvas element and inserts it into a specified DIV element.
Here’s how to use it: