Barcode Perl Module


NAME

 Barcode - version 1.3 Thu Sep 21 7:30:30 EDT 2000

 Creates a barcode image as a png file object. Currently only does type
 Code 128 (B or C). Also decodes scans from the CueCat scanner. This module
is part of the CueCat Project.


SYNOPSIS

 use Barcode;

 Class Code128
 # create a Code 128 barcode
 my $barcode = Code128->new($bar_code,$quiet_zone,$polarity,$density,
        $dpi,$image_type,$description);
 
 where: $bar_code = string to be barcoded
                $quiet_zone = number of clear x-dimensions each end
                $polarity = bw (black on white) or wb (white on black)
                $density = width of individual bars in .001 inch
                $dpi = resolution of target printer
                $image_type = 'transparent' or 'interlaced't
                $description = optional description
                        
 Returns the png file in $barcode->{'png_file'}.

 Class CodeISBN
 Constructs the ISBN number from the raw barcode value on an ISBN
 barcode (this is the number found above the ISBN barcode).

 # return the ISBN number after previously decoding the barcode
 my $isbn = CodeISBN->encode($scan->{'barcode_data'});

 Returns $isbn->{'isbn_value'}.

 Class Cuecat
 Two decode methods are provided: decode and kdecode.

 CueCat->decode uses a perl decode routine on raw scan data from the
 CueCat. This method is NOT recommended on linux or any system using
 X-Windows due to the initial Alt-F10 sequence sent by the CueCat.
 It will work on a regular text console however, provided you do not
 have a virtual terminal set up on tty10.

 CueCat->kdecode is a binding to the linux CueCat kernel driver and
 is the recommended method on linux. The kernel driver is available at
 http://oss.lineo.com/cuecat/.

 # decode a barcode with the decode method
 my $scan = CueCat->decode($scan_string);

 # decode a barcode with the kdecode method
 my $scan = CueCat->kdecode;

 Returns $scan->{'barcode_type'} $scan->{'barcode_data'} and
 $scan->{'cuecat_ser_no'} in either method. If you call CueCat->kdecode
 inside a loop you must destroy the object created by calling
 $scan->destroy($scan->{'pid'}) before returning to the start of the
 loop.

        
        
        
        


DESCRIPTION

 Creates a barcode image as a png object which you can then print or
 save to a file and decodes barcode scans from the CueCat scanner
 <www.cuecat.com>.

 Currently only creates type Code 128 barcodes.
 If the data string is an odd length or contains non-digit characters,
 Code B is used, otherwise Code C.

 For more information on barcodes see
 BarCode1 http://www.adams1.com/pub/russadam/barcode1.html.


AUTHOR

 D. Scott Barninger <barninger@cvn.net>
 http://www.b-wdesigngroup.com
 License: licensed under the same terms as Perl (Artistic License).

 Based upon work by

 Carl Sewell <csewell@hiwaay.net>
 http://home.hiwaay.net/~csewell/

 Greg Kearney <gkearney@new-sharon.me.us>
 http://www.new-sharon.me.us/upc.html

This page has been accessed

times since 09/19/2000