C4::Labels - Functions for printing spine labels and barcodes in Koha
$options = get_label_options()
Return a pointer on a hash list containing info from labels_conf table in Koha DB.
add_batch($batch_type,\@batch_list); if $batch_list is supplied, create a new batch with those items. else, return the next available batch_id.
@profiles = GetAllPrinterProfiles()
Returns an array of references-to-hash, whos keys are .....
$profile = GetSinglePrinterProfile()
Returns a hashref whos keys are...
SaveProfile('parameters')
When passed a set of parameters, this function updates the given profile with the new parameters.
CreateProfile('parameters')
When passed a set of parameters, this function creates a new profile containing those parameters and returns any errors.
DeleteProfile(prof_id)
When passed a profile id, this function deletes that profile from the database and returns any errors.
$assoc_prof = GetAssociatedProfile(tmpl_id)
When passed a template id, this function returns the parameters from the currently associated printer profile in a hashref where key=fieldname and value=fieldvalue.
SetAssociatedProfile($prof_id, $tmpl_id)
When passed both a profile id and template id, this function establishes an association between the two. No more than one profile may be associated with any given template at the same time.
$options = GetLabelItems()
Returns an array of references-to-hash, whos keys are the fields from the biblio, biblioitems, items and labels tables in the Koha database.
Parse labels_conf.formatstring value (one value of the csv, which has already been split) and return string from koha tables or MARC record.
Return a hashref of an array of hashes, with name,type keys.
build_circ_barcode( $x_pos, $y_pos, $barcode, $barcodetype, \$item);
$item is the result of a previous call to GetLabelItems();
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.
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!
Mason James <mason@katipo.co.nz>