Bug 22835: Serve plugin static files through API
[srvgit] / svc / barcode
index 1a00c1f..89ea0a4 100755 (executable)
@@ -42,8 +42,28 @@ I<barcode> is the desired barcode. It should be called like:
 
 =item I<type>
 
-I<type> is the desired barcode type. Possible values are TODO. If ommited,
-it defaults to Code39.
+I<type> is the desired barcode type. Possible values are
+Code39
+UPCE
+UPCA
+QRcode
+NW7
+Matrix2of5
+ITF
+Industrial2of5
+IATA2of5
+EAN8
+EAN13
+COOP2of5
+
+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
 
@@ -59,7 +79,13 @@ Returns a Code39 barcode image for barcode 123456789
 
 Returns a UPCE barcode image for barcode 123456789
 
-=cut
+=item /cgi-bin/koha/svc/barcode?barcode=123456789&notext=1
+
+Returns a Code39 barcode image for barcode 123456789
+which does not include the human readable text '123456789'
+below the scannable barcode.
+
+=back
 
 my $input = new CGI;
 
@@ -73,10 +99,11 @@ binmode(STDOUT);
 
 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 ( $@ ) {
@@ -93,4 +120,4 @@ exit 0;
 
 Kyle M Hall <kyle@bywatersolutions.com>
 
-=cut
\ No newline at end of file
+=cut