[Bug 14149] New: Labels: Make barcode width and height scaling editable
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14149 Bug ID: 14149 Summary: Labels: Make barcode width and height scaling editable Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Label/patron card printing Assignee: cnighswonger@foundations.edu Reporter: cnighswonger@foundations.edu QA Contact: testopia@bugs.koha-community.org Provide an extension of Bug 14107 to apply to barcodes on label layouts as well. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14149 Chris Nighswonger <cnighswonger@foundations.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=14107 CC| |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14149 --- Comment #1 from Marc Véron <veron@veron.ch> --- Hi Chris, I'm sorry but it is not as easy as with the patron cards. Reason: Patron cards store the layout values as xml in the table creator_layouts in field layout_xml, while labels store their values in separate columns. This is commented in line 41 of : # FIXME: all layouts should be stored in xml format to greatly simplify handling -chris_n To expose scaling for editing it would be necessary to first move store the values in the xml field. For exsting installations the values of defined labels would have to be transferred to xml as well and after that the obsolete columns could be removed. We would then have the same situation as with patron cards and could implement the scaling editing following the same pattern. Link to schema: http://schema.koha-community.org/tables/creator_layouts.html -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14149 --- Comment #2 from Chris Nighswonger <cnighswonger@foundations.edu> --- (In reply to Marc Véron from comment #1)
This is commented in line 41 of : # FIXME: all layouts should be stored in xml format to greatly simplify handling -chris_n
WOW! Its been a long time since I added that note, but I do remember that appearing to be a much easier method. Thanks for looking. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14149 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=10762 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14149 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=14781 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14149 Theodoros Theodoropoulos <theod@lib.auth.gr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |theod@lib.auth.gr -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14149 --- Comment #3 from Theodoros Theodoropoulos <theod@lib.auth.gr> --- This proposed addition to have the user define the size of the barcode is very useful indeed! But until then, with the current situation, we realized that the hardcoded relative values in Label.pm were very conservative for 'normal'-sized labels For our needs, we found out that a default value of 20% of the label height and 90% of the label width (compared to the original values of 10% and 80% respectably) produce taller barcodes that are easier to read. In case it helps anyone, the relevant patch to achieve this is: --- ./src/C4/Labels/Label.pm 2015-10-01 10:35:54.414837999 +0300 +++ ./src/C4/Labels/Label.pm.orig 2015-10-01 10:34:38.470837999 +0300 @@ -282,8 +282,8 @@ my $self = shift; my $barcode_llx = $self->{'llx'} + $self->{'left_text_margin'}; # this places the bottom left of the barcode the left text margin distance to right of the left edge of the label ($llx) my $barcode_lly = $self->{'lly'} + $self->{'top_text_margin'}; # this places the bottom left of the barcode the top text margin distance above the bottom of the label ($lly) - my $barcode_width = 0.8 * $self->{'width'}; # this scales the barcode width to 80% of the label width - my $barcode_y_scale_factor = 0.01 * $self->{'height'}; # this scales the barcode height to 10% of the label height + my $barcode_width = 0.9 * $self->{'width'}; # this scales the barcode width to 90% of the label width + my $barcode_y_scale_factor = 0.02 * $self->{'height'}; # this scales the barcode height to 20% of the label height return 0, 0, 0, $barcode_llx, $barcode_lly, $barcode_width, $barcode_y_scale_factor; } (Needless to say again that the best approach would be to make it selectable by the user in the template screen!) -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org