Using a CPAN module to generate & print barcodes?

Submitted by hasorli on

Perl on CPAN
Requires: Perl 5.004, Carp, Exporter, GD (optional)
http://search.cpan.org/~wrw/Barcode-Code128-2.21/lib/Barcode/Code128.pm…

Example:
use Barcode::Code128 'FNC1';
$code = new Barcode::Code128;
$code->text(FNC1.'00000123455555555558');

This is CODE128 which may not be what you want if you are trying to print barcodes for retail purposes. In the US you would want to use UPC-E (for those reading from Europe, this is similar to EAN there). Different barcode scanners encode information differently so using the wrong type will result in problems.

Recommend readinging before you start:
http://www.scandit.com/2011/10/13/types-barcode-upc-ean-code128-vs-qr-d…

Also note: Most barcode decoders (on-scanner or otherwise) have to be programmed to know what sort of barcode they are expecting so you don't want to mix these in an environment.

Pdftricks and pstricks can be used to generate barcode images in LaTeX templates.
http://mirror.hmc.edu/ctan/graphics/pstricks/contrib/pst-barcode/pst-ba…
http://ctan.cermin.lipi.go.id/graphics/pstricks/contrib/pst-pdf/pst-pdf…
http://www.ctan.org/pkg/pdftricks

Q: Brian Wolf
A: Chris Travers
Source: http://permalink.gmane.org/gmane.comp.finance.ledger.smb.user/6822

Release