BarCode

June 15, 2017 ยท View on GitHub

back

tag barcode

You can add barcode, by directly inserting the <barcode> tag in the HTML to convert :

<barcode dimension="1D" type="EAN13" value="45" label="label" style="width:30mm; height:6mm; color: #770000; font-size: 4mm"></barcode>

attributes

AttributeDefaultDescription
dimension1Dcreate a 1D or 2D barcode
typeC39type of barcode to use
value0value to convert into barcode
labellabelindicates that the label must be present below the bar code (label) or not (none) (not required)
stylesets the color for the bar, its width and height (without the label) and the size of the label if it is displayed (not required)

1D types

For 1D bar-codes, the possible values for type attribute are:

TypeDescription
C39CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.
C39+CODE 39 with checksum
C39ECODE 39 EXTENDED
C39E+CODE 39 EXTENDED + CHECKSUM
C93CODE 93 - USS-93
S25Standard 2 of 5
S25+Standard 2 of 5 + CHECKSUM
I25Interleaved 2 of 5
I25+Interleaved 2 of 5 + CHECKSUM
C128CODE 128
C128ACODE 128 A
C128BCODE 128 B
C128CCODE 128 C
EAN22-Digits UPC-Based Extension
EAN55-Digits UPC-Based Extension
EAN8EAN 8
EAN13EAN 13
UPCAUPC-A
UPCEUPC-E
MSIMSI (Variation of Plessey code)
MSI+MSI + CHECKSUM (modulo 11)
POSTNETPOSTNET
PLANETPLANET
RMS4CCRMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)
KIXKIX (Klant index - Customer index)
IMBIMB - Intelligent Mail Barcode - Onecode - USPS-B-3200
IMBPREIMB - Intelligent Mail Barcode - Onecode - USPS-B-3200- pre-processed
CODABARCODABAR
CODE11CODE 11
PHARMAPHARMACODE
PHARMA2TPHARMACODE TWO-TRACKS

2D types

For 2D barcodes, the possible values for type attribute are:

TypeDescription
DATAMATRIXDATAMATRIX (ISO/IEC 16022)
PDF417PDF417 (ISO/IEC 15438:2006)
QRCODEQR-CODE
RAWRAW MODE
RAW2RAW MODE

tag qrcode

You can directly add bar-codes to two-dimensional QR-Code, by inserting the tag QRcode directly in the HTML to convert:

<qrcode value="Value to Coder" ec="H" style="width: 50mm; background-color: white; color: black;"></qrcode>

attributes

AttributeDefaultDescription
valuevalue to convert into barcode
ecHlevel of error correction (L, M, Q, H)
stylesets the width, color, background-color, and border of the qrcode

back