#
# This file is part of Koha.
#
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 3 of the License, or (at your option) any later
-# version.
+# Koha is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
#
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# Koha is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
#
-# You should have received a copy of the GNU General Public License along
-# with Koha; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# You should have received a copy of the GNU General Public License
+# along with Koha; if not, see <http://www.gnu.org/licenses>.
use Modern::Perl;
=head1 NAME
- /cgi-bin/koha/svc/barcode
+/cgi-bin/koha/svc/barcode
=head1 SYNOPSIS
If ommited,it defaults to Code39.
+=item I<notext>
+
+Unless I<notext=1> is specified in the parameter list, the
+value of the barcode will included as text below the
+scannable barcode.
+
+
=back
=head2 EXAMPLES
Returns a UPCE barcode image for barcode 123456789
+=item /cgi-bin/koha/svc/barcode?barcode=123456789¬ext=1
+
+Returns a Code39 barcode image for barcode 123456789
+which does not include the human readable text '123456789'
+below the scannable barcode.
+
+=back
+
=cut
my $input = new CGI;
my $type = $input->param('type') || 'Code39';
my $barcode = $input->param('barcode');
+my $notext = $input->param('notext') ? 1 : 0;
my $image;
eval {
- $image = GD::Barcode->new( $type, $barcode )->plot()->png();
+ $image = GD::Barcode->new( $type, $barcode )->plot( NoText => $notext )->png();
};
if ( $@ ) {