<<

NAME

C4::Labels - Functions for printing spine labels and barcodes in Koha

FUNCTIONS

get_label_options;
        $options = get_label_options()

Return a pointer on a hash list containing info from labels_conf table in Koha DB.

get_label_items;
        $options = get_label_items()

Returns an array of references-to-hash, whos keys are the field from the biblio, biblioitems, items and labels tables in the Koha database.

build_circ_barcode;
  build_circ_barcode( $x_pos, $y_pos, $barcode,
                $barcodetype, \$item);

$item is the result of a previous call to get_label_items();

draw_boundaries
 sub draw_boundaries ($x_pos_spine, $x_pos_circ1, $x_pos_circ2,
                $y_pos, $spine_width, $label_height, $circ_width)  

This sub draws boundary lines where the label outlines are, to aid in printer testing, and debugging.

drawbox
        sub drawbox {   $lower_left_x, $lower_left_y, 
                        $upper_right_x, $upper_right_y )

this is a low level sub, that draws a pdf box, it is called by draw_boxes

FYI: the $upper_right_x and $upper_right_y values are RELATIVE to $lower_left_x and $lower_left_y

and $lower_left_x, $lower_left_y are ABSOLUTE, this caught me out!

AUTHOR

Mason James <mason@katipo.co.nz>

<<