Barcode Technology (QRCode etc.)

For on overview of different barcode technologies and types see: http://en.wikipedia.org/wiki/Barcode

gnu barcode

http://www.gnu.org/software/barcode/

sudo apt-get install barcode

perl barcode

http://search.cpan.org/~kwitknr/GD-Barcode-1.15/

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

ean13test.pl, a minimal example for EAN-13:

use GD::Barcode::EAN13;
binmode(STDOUT);
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;

call:

perl ean13test.pl

libtmdx

excellent library for reading and writing 2D Data Matrix Codes (no QR code) http://www.libdmtx.org/

example use: pyDataMatrixScanner

pyDataMatrixScanner

http://sourceforge.net/projects/pydmscanner/
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 http://libdmtx.wikidot.com/general-instructions ) 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 https://libdmtx.svn.sourceforge.net/svnroot/libdmtx/trunk/ libdmtx
cd libdmtx
./autogen.sh
./configure
sudo make install
sudo ldconfig
cd wrapper/python
sudo make install

now get pyDataMatrixScanner

cd ~/Downloads
svn co https://pydmscanner.svn.sourceforge.net/svnroot/pydmscanner pydmscanner
cd pydmscanner/trunk/pyDataMatrixScanner
make

and run:

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

KBarcode

http://www.kbarcode.net/

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

http://github.com/anujluthra/barcode-generator/

QR Code

goqr - online generator

http://goqr.me/

Google Online API:

Documentation: http://code.google.com/apis/chart/infographics/docs/qr_codes.html

Example:

https://chart.googleapis.com/chart?cht=qr&chs=200x200&choe=UTF-8&chl=https://blog.philippklaus.de

qrencode

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

example:

qrencode -o qrcode_effHomenet.png http://efficient-homenetwork.wikidot.com

pyqrcode

http://pyqrcode.sourceforge.net/
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
wget http://mesh.dl.sourceforge.net/project/pyqrcode/pyqrcode/0.2.1/pyqrcode-0.2.1.tar.gz
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

http://pygooglechart.slowchop.com/
A library that can be used to interface google chart apis (for qr code e.g.)

Comments