/** * Constructor. * * @param $format * Either the name of a Label Format in the Option Value table. * or an array of Label Format values. * @param string|\Unit $unit Unit of measure for the PDF document */ public function __construct($format, $unit = 'mm') { if (is_array($format)) { // Custom format $tFormat = $format; } else { // Saved format $tFormat = CRM_Core_BAO_LabelFormat::getByName($format); } $this->LabelSetFormat($tFormat, $unit); parent::__construct($this->orientation, $this->metricDoc, $this->paper_dimensions); $this->generatorMethod = NULL; $this->SetFont($this->fontName, $this->fontStyle); $this->SetFontSize($this->charSize); $this->SetMargins(0, 0); $this->SetAutoPageBreak(FALSE); $this->setPrintHeader(FALSE); $this->setPrintFooter(FALSE); }