C4::Barcodes::PrinterConfig - Koha module dealing with labels in a PDF.
use C4::Barcodes::PrinterConfig;
This package is used to deal with labels in a pdf file. Giving some parameters, this package contains several functions to handle every label considering the environment of the pdf file.
Takes all the X positions of the pdf file.
Takes all the Y positions of the pdf file.
Test if the label passed as a parameter is the first label to be printed into the pdf file.
C4::Barcodes::PrinterConfig::setPositionsForX($marginLeft, $labelWidth, $columns, $pageType);
Calculate and stores all the X positions across the pdf page.
$marginLeft
Indicates how much left margin do you want in your page type.
$labelWidth
Indicates the width of the label that you are going to use.
$columns
Indicates how many columns do you want in your page type.
$pageType
Page type to print (eg: a4, legal, etc).
C4::Barcodes::PrinterConfig::setPositionsForY($marginBottom, $labelHeigth, $rows, $pageType);
Calculate and stores all tha Y positions across the pdf page.
$marginBottom
Indicates how much bottom margin do you want in your page type.
$labelHeigth
Indicates the height of the label that you are going to use.
$rows
Indicates how many rows do you want in your page type.
$pageType
Page type to print (eg: a4, legal, etc).
(my $x, my $y, $pdfObject, $pageObject, $gfxObject, $textObject, $coreObject, $labelPosition) = C4::Barcodes::PrinterConfig::getLabelPosition($labelPosition, $pdfObject, $page, $gfx, $text, $fontObject, $pageType);
Return the (x,y) position of the label that you are going to print considering the environment.
$labelPosition
Indicates which label positions do you want to place by x and y coordinates.
$pdfObject
The PDF object in use.
$page
The page in use.
$gfx
The gfx resource to handle with barcodes objects.
$text
The text resource to handle with text.
$fontObject
The font object
$pageType
Page type to print (eg: a4, legal, etc).
my @labelTable = C4::Barcodes::PrinterConfig::labelsPage($rows, $columns);
This function will help you to build the labels panel, where you can choose wich label position do you want to start the printer process.
$rows
Indicates how many rows do you want in your page type.
$columns
Indicates how many rows do you want in your page type.
Koha Physics Library UNLP <matias_veleda@hotmail.com>