class CRM_Utils_PDF_Label extends TCPDF

Class CRM_Utils_PDF_Label

Properties

array $defaults Default label format values
array $format Current label format values
string $formatName Name of format
float $marginLeft Left margin of labels
float $marginTop Top margin of labels
float $xSpace Horizontal space between 2 labels
float $ySpace Vertical space between 2 labels
float $xNumber Number of labels horizontally
float $yNumber Number of labels vertically
float $width Width of label
float $height Height of label
float $lineHeight Line Height of label - used in event code
float $paddingLeft Space between text and left edge of label
float $paddingTop Space between text and top edge of label
float $charSize Character size (in points)
string $metricDoc Metric used for all PDF doc measurements
string $fontName Name of the font
string $fontStyle 'B' bold, 'I' italic, 'BI' bold+italic
string $paperSize Paper size name
string $orientation Paper orientation
array $paper_dimensions Paper dimensions array (w, h)
float $countX Counter for positioning labels
float $countY Counter for positioning labels

Methods

__construct($format, string|Unit $unit = 'mm')

Constructor.

SetGenerator($objectinstance, string $methodname = 'generateLabel')

No description

float|int|mixed
getFormatValue(string $name, bool $convert = FALSE)

No description

LabelSetFormat($format, $unit)

initialize label format settings.

generateLabel(string $text)

Generate the pdf of one label (can be modified using SetGenerator)

AddPdfLabel($texte)

Print a label.

array
getFontNames()

Get the available font names.

Details

at line 167
__construct($format, string|Unit $unit = 'mm')

Constructor.

Parameters

$format Either the name of a Label Format in the Option Value table. or an array of Label Format values.
string|Unit $unit Unit of measure for the PDF document

at line 192
SetGenerator($objectinstance, string $methodname = 'generateLabel')

Parameters

$objectinstance
string $methodname

at line 203
float|int|mixed getFormatValue(string $name, bool $convert = FALSE)

Parameters

string $name
bool $convert

Return Value

float|int|mixed

at line 224
LabelSetFormat($format, $unit)

initialize label format settings.

Parameters

$format
$unit

at line 255
generateLabel(string $text)

Generate the pdf of one label (can be modified using SetGenerator)

Parameters

string $text

at line 303
AddPdfLabel($texte)

Print a label.

Parameters

$texte

at line 334
array getFontNames()

Get the available font names.

Return Value

array