/** * Constructor. * * @param array $tagProperties tag properties * @return void */ public function __construct($tagProperties) { parent::__construct($tagProperties); $this->useStyle = true; if (isset($tagProperties['USESTYLE'])) { $this->useStyle = $tagProperties['USESTYLE']; } }
/** * Constructor. * * Parse the tag attributes * * @param array $tagAttributes tag attributes * @return void */ public function __construct($tagAttributes) { parent::__construct($tagAttributes); $left = $top = 0; if (isset($tagAttributes['REF'])) { $ref = $tagAttributes['REF']; } if (isset($tagAttributes['URL'])) { $url = $tagAttributes['URL']; } if (isset($tagAttributes['NAME'])) { $name = $tagAttributes['NAME']; } if (isset($tagAttributes['LEFT'])) { $left = $tagAttributes['LEFT']; } if (isset($tagAttributes['TOP'])) { $top = $tagAttributes['TOP']; } // par default les liens sont en bleu et souligné if (!isset($tagAttributes['FONTCOLOR'])) { $this->fontColor = '#0000FF'; } if (!isset($tagAttributes['FONTSTYLE'])) { $this->fontStyle = 'U'; } // positionne le curseur if ($left > 0) { $this->pdf->SetX($left); } if ($top > 0) { $this->pdf->SetY($top); } $this->pdf->setFont($this->font, $this->fontStyle, $this->fontSize); $color = Xml2Pdf::convertColor($this->fontColor); $this->pdf->setTextColor($color['r'], $color['g'], $color['b']); if (isset($ref) && isset($name)) { if (!isset($this->pdf->linksIds[$ref])) { $this->pdf->linksIds[$ref] = $this->pdf->AddLink(); } $url = $this->pdf->linksIds[$ref]; } $this->pdf->Write($this->pdf->defaultLn, $name, $url); }
/** * */ public function __construct($tagProperties, $parent) { parent::__construct($tagProperties); $this->_parent = $parent; if (isset($tagProperties['ROTATION'])) { $this->rotation = $tagProperties['ROTATION']; } if (isset($tagProperties['TOP'])) { $this->top = $tagProperties['TOP']; } if (isset($tagProperties['LEFT'])) { $this->left = $tagProperties['LEFT']; } if (isset($tagProperties['START'])) { $this->start = $tagProperties['START']; } if (isset($tagProperties['END'])) { $this->end = $tagProperties['END']; } }
/** * Constructor. * * @param array $attributes tag properties. * @return void */ public function __construct($attributes) { parent::__construct($attributes); if (isset($attributes['START'])) { $this->startPage = $attributes['START']; } if (isset($attributes['END'])) { $this->endPage = $attributes['END']; } $this->lineHeight = $this->fontSize / 2; }
/** * Constructor. * * Parse the tag properties. * * @param array $tagProperties tag attributes * @return void */ public function __construct($tagProperties) { parent::__construct($tagProperties); $this->useStyle = false; }
/** * Constructor. * * @param array $tagProperties tag properties * @return void */ public function __construct($tagProperties) { parent::__construct($tagProperties); if (isset($tagProperties['BORDER'])) { $this->border = $tagProperties['BORDER']; } if (isset($tagProperties['BORDERCOLOR'])) { $this->borderColor = $tagProperties['BORDERCOLOR']; } if (isset($tagProperties['FILL'])) { $this->fill = $tagProperties['FILL']; } if (isset($tagProperties['FILLCOLOR'])) { $this->fillColor = $tagProperties['FILLCOLOR']; } if (isset($tagProperties['START'])) { $this->startPage = $tagProperties['START']; } if (isset($tagProperties['END'])) { $this->endPage = $tagProperties['END']; } if (isset($tagProperties['TOP'])) { $this->top = $tagProperties['TOP']; } if (isset($tagProperties['LEFT'])) { $this->left = $tagProperties['LEFT']; } //if(isset($tagProperties['POSITION'])) { // $this->position = (strtolower($tagProperties['POSITION'])=='absolute')? // 'absolute':'relative'; //} if (isset($tagProperties['ALIGN'])) { switch (strtoupper($tagProperties['ALIGN'])) { case 'L': case 'LEFT': $this->align = 'L'; break; case 'R': case 'RIGHT': $this->align = 'R'; break; case 'C': case 'CENTER': $this->align = 'C'; break; } } }
/** * Constructor. * * Parse the tag attributes. * * @param array $tagProperties tag attributes * @param object $parent parent tag * @return void */ public function __construct($tagProperties, $parent) { parent::__construct($tagProperties); if (is_a($parent, 'xml2pdf_tag_header') || is_a($parent, 'xml2pdf_tag_footer')) { $this->parent = $parent; } // parse properties if (isset($tagProperties['WIDTH'])) { $this->width = $tagProperties['WIDTH']; } if (isset($tagProperties['BORDER'])) { $this->border = $tagProperties['BORDER']; } if (isset($tagProperties['BORDERCOLOR'])) { $this->borderColor = $tagProperties['BORDERCOLOR']; } if (isset($tagProperties['FILL'])) { $this->fill = $tagProperties['FILL']; } if (isset($tagProperties['FILLCOLOR'])) { $this->fillColor = $tagProperties['FILLCOLOR']; } if (isset($tagProperties['TOP'])) { $this->top = $tagProperties['TOP']; } if (isset($tagProperties['LEFT'])) { $this->left = $tagProperties['LEFT']; } if (isset($tagProperties['POSITION'])) { $this->position = strtolower($tagProperties['POSITION']) == 'absolute' ? 'absolute' : 'relative'; } if (isset($tagProperties['ALIGN'])) { switch (strtoupper($tagProperties['ALIGN'])) { case 'L': case 'LEFT': $this->align = 'L'; break; case 'R': case 'RIGHT': $this->align = 'R'; break; case 'C': case 'CENTER': $this->align = 'C'; break; } } }