svc/barcode currently generates the barcode using $image = GD::Barcode->new( $type, $barcode )->plot()->png(); From perldoc GD::Barcode plot() $oGd = $oGdBar->plot([Height => $iHeight, NoText => 0 | 1]); creates GD object with barcode image for the $sTxt specified at new method. $iHeight is height of the image. If NoText is 1, the image has no text image of $sTxt. ex. my $oGdB = GD::Barcode->new('EAN13', '123456789012'); my $oGD = $oGdB->plot(NoText=>1, Height => 20); # $sGD is a GD image with Height=>20 pixels, with no text.
Created attachment 74915 [details] [review] Bug 20676: svc/barcode should allow barcode to be printed without text Test plan: 1) Point web browser to <staff url>/cgi-bin/koha/svc/barcode?barcode=*12345*&nobarcode This will display a png image of the barcode 12345 with the text 12345 printed below the scannable barcode. 2) Apply patch 3) Refresh the browser. The human readable text no longer appears.
Created attachment 74939 [details] [review] Bug 20676: svc/barcode should allow barcode to be printed without text Test plan: 1) Point web browser to <staff url>/cgi-bin/koha/svc/barcode?barcode=*12345*¬ext=1 This will display a png image of the barcode *12345* with the text *12345* printed below the scannable barcode. 2) Apply patch 3) Refresh the browser. The human readable text no longer appears.
Created attachment 74940 [details] [review] Bug 20676: svc/barcode should allow barcode to be printed without text Test plan: 1) Point web browser to <staff url>/cgi-bin/koha/svc/barcode?barcode=*12345*¬ext=1 This will display a png image of the barcode *12345* with the text *12345* printed below the scannable barcode. 2) Apply patch 3) Refresh the browser. The human readable text no longer appears. Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Created attachment 74942 [details] [review] Bug 20676: svc/barcode should allow barcode to be printed without text Test plan: 1) Point web browser to <staff url>/cgi-bin/koha/svc/barcode?barcode=*12345*¬ext=1 This will display a png image of the barcode *12345* with the text *12345* printed below the scannable barcode. 2) Apply patch 3) Refresh the browser. The human readable text no longer appears. Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(In reply to Barton Chittenden from comment #4) > Created attachment 74942 [details] [review] [review] > Bug 20676: svc/barcode should allow barcode to be printed without text > > Test plan: > > 1) Point web browser to > <staff url>/cgi-bin/koha/svc/barcode?barcode=*12345*¬ext=1 > > This will display a png image of the barcode *12345* with the > text *12345* printed below the scannable barcode. > > 2) Apply patch > 3) Refresh the browser. The human readable text no longer appears. > > Signed-off-by: Frédéric Demians <f.demians@tamil.fr> This was just removing warnings that I was using for debugging.
Created attachment 75600 [details] [review] Bug 20676: svc/barcode should allow barcode to be printed without text Test plan: 1) Point web browser to <staff url>/cgi-bin/koha/svc/barcode?barcode=*12345*¬ext=1 This will display a png image of the barcode *12345* with the text *12345* printed below the scannable barcode. 2) Apply patch 3) Refresh the browser. The human readable text no longer appears. Signed-off-by: Frédéric Demians <f.demians@tamil.fr> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Awesome work all! Pushed to master for 18.11.x
Enhancement, not backporting for 18.05.x series.