Barcode Technology (QRCode etc.)

For on overview of different barcode technologies and types see:

gnu barcode

sudo apt-get install barcode

perl barcode

GD::Barcode creates barcode images. It supports the following barcode formats:

  • COOP2of5,
  • Code39,
  • EAN13 (JAN13),
  • EAN8 (JAN8),
  • IATA2of5,
  • ITF (Interleaved2of5),
  • Industrial2of5,
  • Matrix2of5,
  • NW7,
  • QRcode,
  • UPC-A and
  • UPC-E.

Install this Perl library using:

sudo aptitude install libgd-barcode-perl, a minimal example for EAN-13:

use GD::Barcode::EAN13;
print "Content-Type: image/png\n\n";
my $oGdBar = GD::Barcode::EAN13->new('123456789012');
die $GD::Barcode::EAN13::errStr unless($oGdBar);      #Invalid Length
print $oGdBar->plot->png;




excellent library for reading and writing 2D Data Matrix Codes (no QR code)

example use: pyDataMatrixScanner

to scan barcodes at conferences!!!! nice!

requirements (according to ./trunk/pyDataMatrixScanner/README):

sudo aptitude install libdmtx-utils libv4l-0 python-gtk2 python-virtkey python-alsaaudio libv4l-dev

method 1: get libdtmx as ubuntu package !!too old API in jaunty!! use SVN instead! Ubuntu package libdmtx0 on jaunty libdmtx0a on karmic: so on jaunty (libdmtx0) we we still need to get pydmtx built and installed:

sudo aptitude install libdmtx-dev
cd /usr/share/doc/libdmtx-dev/examples/python/
sudo gzip -d pydmtxmodule.c.gz
sudo make install

method 2: get libdtmx from svn and build... Build and install libdtmx (build instructions on ) Ensure that you have the dependencies:

sudo apt-get install automake autoconf libmagickwand-dev libtool python-dev python-imaging libv4l-dev

remove libdtmx package and get libdtmx, make with python wrappers and install

sudo aptitude remove libdmtx0 libdmtx0a libdmtx-dev libdmtx-utils

now get the svn version and build and install

cd ~/Downloads
svn co libdmtx
cd libdmtx
sudo make install
sudo ldconfig
cd wrapper/python
sudo make install

now get pyDataMatrixScanner

cd ~/Downloads
svn co pydmscanner
cd pydmscanner/trunk/pyDataMatrixScanner

and run:

cd ~/Downloads/pydmscanner/trunk/pyDataMatrixScanner
./ -p MJPG -x 960 -y 720 -a -g -b -l -n -v


sudo apt-get install kbarcode

Database Support

Barcode Engine Support (backends that detect different types of barcodes):

  • GNU Barcode
  • PDF417 Encode
  • TBarcode
  • TBarcode2
  • Pure Postscript Barcode Writer

barcode-generator for Rails

QR Code

goqr - online generator

Google Online API:




Qrencode is a utility software using libqrencode to encode string data in a QR Code and save as a PNG image.

sudo aptitude install qrencode


qrencode -o qrcode_effHomenet.png

Python library for encoding and decoding of QR Code tags.

sudo apt-get install jcc sun-java6-sdk python-imaging python-setuptools python-dev

Once the requirements are satisfied, you’re ready to get it to work. The Makefile has a couple of options, but the regular way also works fine.

cd ~/Downloads
tar -xf pyqrcode-0.2.1.tar.gz
cd pyqrcode-0.2.1
make && sudo make install

Building binary distribution of the pyqrcode python extension is also available. In order to generate the python egg, run the following command:

make egg

To install the python egg:

sudo apt-get install python-setuptools

The only issue with the binary egg distribution is that you must use the same version of Java that was used to build the python extension.

In order to install the python egg, type the following:

sudo easy_install qrcode-0.2.1-py2.5-platform.egg

pygooglechart - Python Google Chart
A library that can be used to interface google chart apis (for qr code e.g.)