https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40473
Martin Renvoize (ashimema) <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #184529|0 |1 is obsolete| | --- Comment #5 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 186907 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186907&action=edit Bug 40473: Use better algorithm for calculating Code39 barcode length This patch uses the PDF::Reuse::Barcode algorithm for calculating barcode background box length relative to barcode length in order to determine the actual barcode width and thus the X scale factor required to re-size that barcode so that it fits on the label width (or rather the "Barcode width" which is a percentage applied to the label width to create a narrower usable surface for the barcode and barcode background box). To test: 0. Apply the patch 1. Go to http://localhost:8081/cgi-bin/koha/cataloguing/additem.pl?biblionumber=29 2. Add an item with barcode 123456, add an item with barcode 39999000001310399991, and ensure an item with barcode 39999000001310 already exists 3. Go to http://localhost:8081/cgi-bin/koha/labels/label-manage.pl?label_element=batch 4. Create a patch that uses 3 items using 39999000001310, 2 items with 123456, and 2 items with 39999000001310399991 4. Go to http://localhost:8081/cgi-bin/koha/labels/label-manage.pl?label_element=layout 5. Edit the layout "Label Test" 6. Change the "Barcode width" to 1, and enable "Draw guide boxes", and click "Save" 7. Export the batch using the template "Avery 5160 | 1 x 2-5/8" and the layout "Label Test" and open as PDF 8. Note that the whole barcode fits inside the red guidebox (there should be some overlap of white on top of the red guidebox but that is normal since we're using 100% of the barcode label width). 9. Edit the "Label Test" layout to try "Code39 + Modulo43" and "Code39 + Modulo10" and retry batch export 10. Edit the "Label Test" and try different "Barcode width" like the usual default .8 11. Celebrate that your barcodes fit on the label! Signed-off-by: Martin Renvoize <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
