View | Details | Raw Unified | Return to bug 6448
Collapse All | Expand All

(-)a/C4/Creators/Lib.pm (-1 / +1 lines)
Lines 90-96 my $barcode_types = [ Link Here
90
    {type => 'CODE39MOD',       name => 'Code 39 + Modulo43',   desc => 'Translates the characters 0-9, A-Z, \'-\', \'*\', \'+\', \'$\', \'%\', \'/\', \'.\' and \' \' to a barcode pattern. Encodes Mod 43 checksum.',         selected => 0},
90
    {type => 'CODE39MOD',       name => 'Code 39 + Modulo43',   desc => 'Translates the characters 0-9, A-Z, \'-\', \'*\', \'+\', \'$\', \'%\', \'/\', \'.\' and \' \' to a barcode pattern. Encodes Mod 43 checksum.',         selected => 0},
91
    {type => 'CODE39MOD10',     name => 'Code 39 + Modulo10',   desc => 'Translates the characters 0-9, A-Z, \'-\', \'*\', \'+\', \'$\', \'%\', \'/\', \'.\' and \' \' to a barcode pattern. Encodes Mod 10 checksum.',         selected => 0},
91
    {type => 'CODE39MOD10',     name => 'Code 39 + Modulo10',   desc => 'Translates the characters 0-9, A-Z, \'-\', \'*\', \'+\', \'$\', \'%\', \'/\', \'.\' and \' \' to a barcode pattern. Encodes Mod 10 checksum.',         selected => 0},
92
    {type => 'COOP2OF5',        name => 'COOP2of5',             desc => 'Creates COOP2of5 barcodes from a string consisting of the numeric characters 0-9',                                                                     selected => 0},
92
    {type => 'COOP2OF5',        name => 'COOP2of5',             desc => 'Creates COOP2of5 barcodes from a string consisting of the numeric characters 0-9',                                                                     selected => 0},
93
#    {type => 'EAN13',           name => 'EAN13',                desc => 'Creates EAN13 barcodes from a string of 12 or 13 digits. The check number (the 13:th digit) is calculated if not supplied.',                           selected => 0},
93
    {type => 'EAN13',           name => 'EAN13',                desc => 'Creates EAN13 barcodes from a string of 12 or 13 digits. The check number (the 13:th digit) is calculated if not supplied.',                           selected => 0},
94
#    {type => 'EAN8',            name => 'EAN8',                 desc => 'Translates a string of 7 or 8 digits to EAN8 barcodes. The check number (the 8:th digit) is calculated if not supplied.',                              selected => 0},
94
#    {type => 'EAN8',            name => 'EAN8',                 desc => 'Translates a string of 7 or 8 digits to EAN8 barcodes. The check number (the 8:th digit) is calculated if not supplied.',                              selected => 0},
95
#    {type => 'IATA2of5',        name => 'IATA2of5',             desc => 'Creates IATA2of5 barcodes from a string consisting of the numeric characters 0-9',                                                                     selected => 0},
95
#    {type => 'IATA2of5',        name => 'IATA2of5',             desc => 'Creates IATA2of5 barcodes from a string consisting of the numeric characters 0-9',                                                                     selected => 0},
96
    {type => 'INDUSTRIAL2OF5',  name => 'Industrial2of5',       desc => 'Creates Industrial2of5 barcodes from a string consisting of the numeric characters 0-9',                                                               selected => 0},
96
    {type => 'INDUSTRIAL2OF5',  name => 'Industrial2of5',       desc => 'Creates Industrial2of5 barcodes from a string consisting of the numeric characters 0-9',                                                               selected => 0},
(-)a/C4/Labels/Label.pm (-1 / +25 lines)
Lines 553-558 sub barcode { Link Here
553
            warn sprintf('Barcode generation failed for item %s with this error: %s', $self->{'item_number'}, $@);
553
            warn sprintf('Barcode generation failed for item %s with this error: %s', $self->{'item_number'}, $@);
554
        }
554
        }
555
    }
555
    }
556
    elsif ($params{'barcode_type'} eq 'EAN13') {
557
        $bar_length = 4; # FIXME
558
	$num_of_bars = 13;
559
        $tot_bar_length = ($bar_length * $num_of_bars) + ($guard_length * 2);
560
        $x_scale_factor = ($params{'width'} / $tot_bar_length) * 0.9;
561
        eval {
562
            PDF::Reuse::Barcode::EAN13(
563
                x                   => $params{'llx'},
564
                y                   => $params{'lly'},
565
                value               => sprintf('%013d',$params{barcode_data}),
566
#                xSize               => $x_scale_factor,
567
#                ySize               => $params{'y_scale_factor'},
568
                mode                    => 'graphic',
569
            );
570
        };
571
        if ($@) {
572
            warn sprintf('Barcode generation failed for item %s with this error: %s', $self->{'item_number'}, $@);
573
        }
574
    }
575
    else {
576
	warn "unknown barcode_type: $params{barcode_type}";
577
    }
556
}
578
}
557
579
558
sub csv_data {
580
sub csv_data {
Lines 608-613 This module provides methods for creating, and otherwise manipulating single lab Link Here
608
=item .
630
=item .
609
            INDUSTRIAL2OF5  = The standard 2 of 5 barcode (a binary level bar code developed by Identicon Corp. and Computer Identics Corp. in 1970)
631
            INDUSTRIAL2OF5  = The standard 2 of 5 barcode (a binary level bar code developed by Identicon Corp. and Computer Identics Corp. in 1970)
610
632
633
=item .
634
            EAN13           = The standard EAN-13 barcode
635
611
=back
636
=back
612
637
613
        C<printing_type>        Defines the general layout to be used on labels. NOTE: At present there are only five printing types supported in the label creator code:
638
        C<printing_type>        Defines the general layout to be used on labels. NOTE: At present there are only five printing types supported in the label creator code:
614
- 

Return to bug 6448