Ok well there is what I have currently
#!/usr/bin/perl use strict; use warnings; use GD::Barcode::Code39; my $oGdBar = GD::Barcode->new('Code39', "*$customer{id}*"); #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"; #FIXME prints out error "Can't locate object method "Small" via packag +e "GD::Font" (perhaps you forgot #to load "GD::Font"?) at /usr/local/share/perl5/GD/Barcode/Code39.pm l +ine 111, <> line 19." 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";
Not sure what mistake it is I am making here, I thought I followed the documentation to the letter. Ether way the barcode is being generated I can tell this because of the output from $oGdBar->barcode(), but the /tmp/Code39.png file is empty.
In reply to Re^5: Need some help with GD::Barcode::UPCE module
by vendion
in thread Need some help with GD::Barcode::UPCE module
by vendion
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |