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.
@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.
build_circ_barcode;
build_circ_barcode( $x_pos, $y_pos, $barcode, $barcodetype, \$item);$item is the result of a previous call to GetLabelItems();
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!
Mason James <mason@katipo.co.nz>
Hey! The above document had some coding errors, which are explained below:
You forgot a '=back' before '=head2'
'=item' outside of any '=over'
Unknown directive: =head
=over should be: '=over' or '=over positive_number'
You can't have =items (as at line 1281) unless the first thing after the =over is an =item
Unknown directive: =head
You forgot a '=back' before '=head1'