Skip to content

Appendix: Barcodes in ReportLab

This is a brief guide the barcodes supported in ReportLab.

Further information on the barcode tag for use in RML

The barcode types supported

TypesvgInfoValue
Codabar ... ... Used in blood banks, photo labs and FedEx labels.
Encodes 0-9, -$:/.+, and four start/stop characters A-D.
1234567890
Code11 ... ... Used mostly for labelling telecommunications equipment.
It encodes numeric digits.
1234567890
Code128 ... ... Code 128 encodes any number of characters in the ASCII character set.1234567890
Code128Auto ... ... Modified Code128 to use auto encoding1234567890
EAN13 ... ... 0 000000 000000 N/A000000000000
EAN5 ... ... 00000
EAN-5 barcodes can print the human readable price, set:
price=True
00000
EAN8 ... ... 0000 0000 N/A0000000
ECC200DataMatrix ... ... ECC200DataMatrix1234567890
Extended39 ... ... Extended 39 encodes the full ASCII character set by encoding
characters as pairs of Code 39 characters; $, /, % and + are used as
shift characters.
1234567890
Extended93 ... ... This is a compressed form of Code 39, allowing the full ASCII charset1234567890
BarcodeFIM("A") ... ... A
BarcodeFIM("B") ... ... B
BarcodeFIM("C") ... ... C
BarcodeFIM("D") ... ...
FIM was developed as part of the POSTNET barcoding system.
FIM (Face Identification Marking) is used by the cancelling machines
to sort mail according to whether or not they have bar code
and their postage requirements. There are four types of FIM
called FIM A, FIM B, FIM C, and FIM D.

The four FIM types have the following meanings:
FIM A- Postage required pre-barcoded
FIM B - Postage pre-paid, no bar code exists
FIM C- Postage prepaid prebarcoded
FIM D- Postage required, no bar code exists
D
I2of5 ... ... Interleaved 2 of 5 is used in distribution and warehouse industries.

It encodes an even-numbered sequence of numeric digits. There is an optional
module 10 check digit; if including this, the total length must be odd so that
it becomes even after including the check digit. Otherwise the length must be
even. Since the check digit is optional, our library does not check it.
1234567890
ISBN ... ... 0 000000 000000 ISBN 000-0-00000-000-0
ISBN Barcodes optionally print the EAN-5 supplemental price
barcode (with the price in dollars or pounds). Set price to a string
that follows the EAN-5 for ISBN spec:

leading digit 0, 1 = GBP
3 = AUD
4 = NZD
5 = USD
6 = CAD
next 4 digits = price between 00.00 and 99.98, i.e.:

price='52499' # $24.99 USD
000000000000
MSI ... ... MSI is used for inventory control in retail applications.

There are several methods for calculating check digits so we
do not implement one.
1234567890
POSTNET ... ... N/A1234567890
QR ... ... N/Awww.reportlab.com
Standard39 ... ... Code39 is widely used in non-retail, especially US defence and health.
Allowed characters are 0-9, A-Z (caps only), space, and -.$/+%*.
1234567890
Standard93 ... ... This is a compressed form of Code 391234567890
UPCA ... ... 0 00000 00000 0 N/A00000000000
USPS_4State ... ... N/A1234567890