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

(-)a/svc/barcode (-2 / +14 lines)
Lines 58-63 COOP2of5 Link Here
58
58
59
If ommited,it defaults to Code39.
59
If ommited,it defaults to Code39.
60
60
61
=item I<notext>
62
63
Unless I<notext> is specified in the parameter list, the
64
value of the barcode will included as text below the
65
scannable barcode.
66
67
61
=back
68
=back
62
69
63
=head2 EXAMPLES
70
=head2 EXAMPLES
Lines 72-77 Returns a Code39 barcode image for barcode 123456789 Link Here
72
79
73
Returns a UPCE barcode image for barcode 123456789
80
Returns a UPCE barcode image for barcode 123456789
74
81
82
=item /cgi-bin/koha/svc/barcode?barcode=123456789&notext
83
84
Returns a Code39 barcode image for barcode 123456789
85
which does not include the human readable text '123456789'
86
below the scannable barcode.
75
=cut
87
=cut
76
88
77
my $input = new CGI;
89
my $input = new CGI;
Lines 86-95 binmode(STDOUT); Link Here
86
98
87
my $type = $input->param('type') || 'Code39';
99
my $type = $input->param('type') || 'Code39';
88
my $barcode = $input->param('barcode');
100
my $barcode = $input->param('barcode');
101
my $nobarcode = $input->param('nobarcode') ? 1 : 0;
89
my $image;
102
my $image;
90
103
91
eval {
104
eval {
92
    $image = GD::Barcode->new( $type, $barcode )->plot()->png();
105
    $image = GD::Barcode->new( $type, $barcode )->plot( nobarcode => $nobarcode )->png();
93
};
106
};
94
107
95
if ( $@ ) {
108
if ( $@ ) {
96
- 

Return to bug 20676