in reply to Need some help with GD::Barcode::UPCE module
Ok so I have switched to Code39 barcodes and made the suggested changes to the code, which changes the error that now gets produced. I now get this:
PTN:000-000000:1010001110111010101000111011101010100011101110101000101 +011101110101000111011101010100011101110101010001110111010101000111011 +101010100011101110101010001110111010 Can't locate object method "Small" via package "GD::Font" (perhaps you + forgot to load "GD::Font"?) at /usr/local/share/perl5/GD/Barcode/Cod +e39.pm line 111, <> line 19.
Here is my new code:
my $oGdBar = GD::Barcode::Code39->new("$customer{id}"); if ( !$oGdBar ) { display_menu_error("ERROR: $GD::Barcode::Code39::errStr \n"); } print "PTN:", $oGdBar->{text}, ":", $oGdBar->barcode(), "\n"; my $output = '/tmp/Code39.png'; open my $OUTFILE, '>', $output; binmode $OUTFILE; print {$OUTFILE} $oGdBar->plot->png; close {$OUTFILE}; undef $oGdBar; undef $OUTFILE; undef $output; system "lpr -r $output";
As for the suggestions of changing $oGdBar->{text} to $oGdBar->{$text} does not seem to work. Does the error mean I should use GD::Font in my code or is it reffering to the module?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Need some help with GD::Barcode::UPCE module
by kcott (Archbishop) on Oct 11, 2010 at 07:31 UTC | |
by vendion (Scribe) on Oct 11, 2010 at 16:00 UTC | |
|
Re^2: Need some help with GD::Barcode::UPCE module
by Khen1950fx (Canon) on Oct 11, 2010 at 17:17 UTC | |
by vendion (Scribe) on Oct 11, 2010 at 18:56 UTC | |
by Khen1950fx (Canon) on Oct 11, 2010 at 19:36 UTC | |
by vendion (Scribe) on Oct 14, 2010 at 04:37 UTC | |
by BrowserUk (Patriarch) on Oct 14, 2010 at 05:58 UTC |