You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

In 3AMK libraries, we are using special printers for printing spine labels.

Our printer models are Datamax E-4203, Attune Delta A2 and TSC TA310.
The label sizes are 38mm x 25mm (Haaga-Helia, Laurea) and 36mm x 23mm (Metropolia)

Our needs:

Label 1. All information is taken from itemcallnumber


The label should look like this.


On the first line there is shelf number
On the second line main word (VEAL) is printed.

- The challenge: If the main word is long, it is splitted to the third/fourth line. In Koha-Suomi version, we manually fix these by putting a shorter word to Koha at first, and after printing, we change it back to normal.


Label 2. All information is taken from itemcallnumber


The label should look like this.

On the first line there is shelf number. BTW, the longest shelf number is 658.8.012.1 (at Pasila campus).
One the second line, main word (PILLOT DE CHENECEY) is cropped to 3 characters (PIL).

How to get labels we need?

Option 1. Koha's Tools > Catalog > Label creator

https://koha3-kktest.lib.helsinki.fi/cgi-bin/koha/labels/label-home.pl

  • I've created a template and a label layout (both are named as Finn-ID 38mm x 25mm), and printer profile (Datamax/Attune) for testing purposes.
  • I manage to print labels for Haaga campus. Unfortunately, it is not enough! We need to split call numbers' second line to 3-letters/characters


Option 2. Label maker plugin by ByWater Solutions

  1. Label Creator plugin:  
    1. Part 1:  https://bywatersolutions.com/education/label-creator-plugin 
    2. Part 1, video:  Label Maker Koha Plugin Part 1
    3. Part 2: https://bywatersolutions.com/education/using-the-label-plugin-in-koha-part-2
    4. Part 2, video: Label Maker Plugin Koha Part 2
  2. Github: https://github.com/bywatersolutions/koha-plugin-label-maker 
    1. KPZ-file: https://github.com/bywatersolutions/koha-plugin-label-maker/releases  

The plugin is installed and can be used:
https://koha3-kktest.lib.helsinki.fi/cgi-bin/koha/plugins/plugins-home.pl

  • Click button Actions > Run tool
  • Default templates are: Avery Standard Labels and Basix 55-459-007 (do not delete those)
  • I started creating template for 3AMK label (Finn-ID 38mm x 25mm), but it is unfinished. And I need help with the code!  / 12.6.2020 jmiettunen
[% FOREACH item IN items %]
    [% IF loop.index % 1 == 0 %]
        [% SET label_index = 1 %]
        [% UNLESS loop.first %]
            </span>
        [% END %]
        <span class="page">
    [% END %]

    <div class="label label[% label_index %]">
        [% item.itemcallnumber %]
    </div>
    [% IF loop.last %]</span>[% END %]
    [% SET label_index = label_index + 1 %]
[% END %]


  • I created a layout for 3AMK label (Finn-ID 38mm x 25mm)

html, body, div, span, h1 {
  margin: 0;
  padding: 0;
  border: 0;
}

body {
  width: 8.5in;
}

.page {
  padding-top: 1.18in; /* Height from top of page to top of first label row */
  margin-left: 0.098in; /* Width of gap from left of page to left edge of first label column */

  page-break-after: always;
  clear: left;
  display: block;
}

.label {
  width: 1.5in; /* Width of actual label */
  height: 0.98in; /* Height of actual label */
  margin-right: 0in; /* Distance between each column of labels */

  float: left;

  text-align: left;
  font-weight: bold;
  overflow: hidden;
}

  /* Uncomment for testing and debugging */
  /* outline: 1px dotted; */
}

.page-break  {
  clear: left;
  display: block;
  page-break-after: always;
}
  • I made one batch with 5 items, so it can be used to print using the template and layout.
  • But, I have no idea how to set Printer profiles, because there is no example for it. / 12.6.2020 jmiettunen

More detailed information e.g. on splitting call numbers, see https://bywatersolutions.com/education/using-the-label-plugin-in-koha-part-2

  • There seems to be mistakes/errors on documentation. Their code shown below should do the splitting part. But is it correct? / 12.6.2020 jmiettunen

$(document).ready(function () {

$('.label').each(function() {

let theText = $(this).text();

let theNewText = theText.trim().replace(/\s+/g, '

').replace('.' , '

.');

$(this).html(theNewText);

})

});


Perl split functions (no idea if this is useful...) / 19.10.2020 jmiettunen
see: https://www.geeksforgeeks.org/perl-split-function/


  • No labels