/** * Constructor. * * Parse the tag attributes * * @param array $tagProperties tag attributes * @return void */ public function __construct($tagProperties) { parent::__construct($tagProperties); if (isset($tagProperties['FONT'])) { $this->pdf->pageFont = $tagProperties['FONT']; } if (isset($tagProperties['FONTSIZE'])) { $this->pdf->pageFontSize = $tagProperties['FONTSIZE']; } if (isset($tagProperties['FONTCOLOR'])) { $this->pdf->pageFontColor = $tagProperties['FONTCOLOR']; } if (isset($tagProperties['FONTSTYLE'])) { $this->pdf->pageFontStyle = $tagProperties['FONTSTYLE']; } $this->pdf->AddPage(); $this->pdf->resetFont(); }
/** * Constructor. * * Parse the tag properties. * * @param object Pdf $pdf object Pdf * @param array $tagProperties tag properties * @return void */ public function __construct($tagProperties) { parent::__construct($tagProperties); // parse the tag properties for text $pdf = Pdf::singleton(); if (isset($tagProperties['FONT']) && $tagProperties['FONT'] != '') { $this->font = $tagProperties['FONT']; } else { $this->font = $pdf->pageFont; } if (isset($tagProperties['FONTSTYLE'])) { $this->fontStyle = $tagProperties['FONTSTYLE']; } if (isset($tagProperties['FONTCOLOR'])) { $this->fontColor = $tagProperties['FONTCOLOR']; } if (isset($tagProperties['FONTSIZE'])) { $this->fontSize = $tagProperties['FONTSIZE']; } if (isset($tagProperties['TEXTALIGN'])) { $this->textAlign = $tagProperties['TEXTALIGN']; } if (isset($tagProperties['LINEHEIGHT'])) { $this->lineHeight = $tagProperties['LINEHEIGHT']; } if (isset($tagProperties['BORDER'])) { $this->border = $tagProperties['BORDER']; } if (isset($tagProperties['WIDTH'])) { $this->width = $tagProperties['WIDTH']; } if (isset($tagProperties['LINESPACING'])) { $this->lineSpacing = $tagProperties['LINESPACING']; } }
/** * Constructor. * * Parse the tag properties. * * @param array $attrs tag properties * @return void */ public function __construct(&$attrs) { parent::__construct($attrs); $availableAttrs = array('x', 'y', 'barcode', 'width', 'height', 'norm', 'position'); foreach ($attrs as $attr => $value) { $attr = strtolower($attr); if (in_array($attr, $availableAttrs)) { $this->{$attr} = $value; } else { die('property ' . $attr . ' unrecognize for tag barcode'); } } }
/** * Constructor. * * Parse the properties. * * @param array $attrs tag properties * @param object $parent object xml2pdf_tag_table * @return void */ public function __construct(&$attrs, $parent) { parent::__construct($attrs); $this->table = $parent; if (isset($attrs['FONT'])) { $this->font = $attrs['FONT']; } if (isset($attrs['FONTSIZE'])) { $this->fontSize = $attrs['FONTSIZE']; } if (isset($attrs['FONTSTYLE'])) { $this->fontStyle = $attrs['FONTSTYLE']; } if (isset($attrs['FONTCOLOR'])) { $this->fontColor = $attrs['FONTCOLOR']; } if (isset($attrs['FILL'])) { $this->fill = $attrs['FILL']; } if (isset($attrs['FILLCOLOR'])) { $this->fillColor = $attrs['FILLCOLOR']; } if (isset($attrs['BORDER'])) { $this->border = $attrs['BORDER']; } if (isset($attrs['BORDERCOLOR'])) { $this->borderColor = $attrs['BORDERCOLOR']; } if (isset($attrs['TEXTALIGN'])) { switch (strtolower($attrs['TEXTALIGN'])) { case 'l': case 'left': $this->textAlign = 'L'; break; case 'r': case 'right': $this->textAlign = 'R'; break; case 'c': case 'center': $this->textAlign = 'C'; break; case 'j': case 'justify': $this->textAlign = 'J'; break; } } if (isset($attrs['LINEHEIGHT'])) { $this->lineHeight = $attrs['LINEHEIGHT']; } }
/** * Constructor. * * @param array $attributes tag properties * @return void */ public function __construct($attributes) { parent::__construct($attributes); $left = 0; $top = 0; $absolute = false; if (isset($attributes['TYPE'])) { $this->type = strtolower($attributes['TYPE']); } if (isset($attributes['WIDTH'])) { $this->width = $attributes['WIDTH']; } if (isset($attributes['HEIGHT'])) { $this->height = $attributes['HEIGHT']; } if (isset($attributes['LEFT'])) { $left = $attributes['LEFT']; } if (isset($attributes['TOP'])) { $top = $attributes['TOP']; } if (isset($attributes['POSITION'])) { $absolute = strtolower($attributes['POSITION']) == 'absolute'; } if (isset($attributes['MODE'])) { $this->mode = strtolower($attributes['MODE']); } if (isset($attributes['LEGEND'])) { $this->legendFormat = $attributes['LEGEND']; } if (isset($attributes['COLOR'])) { $this->color = $attributes['COLOR']; } if (isset($attributes['MAX'])) { $this->maxValRepere = $attributes['MAX']; } if (isset($attributes['REPERE'])) { $this->nbIndRepere = $attributes['REPERE']; } if (isset($attributes['FONTSIZE'])) { $this->fontSize = $attributes['FONTSIZE']; } $delta = $this->mode == '3d' ? 4 : 0; if ($absolute) { $this->left = $left; $this->top = $top + $delta; } else { $this->left = $this->pdf->GetX() + $left; $this->top = $this->pdf->GetY() + $top + $delta; } }
/** * Constructor. * * Parse the tag properties. * * @param object Pdf $pdf object Pdf * @param array $tagProperties tag properties * @return void */ public function __construct($tagProperties) { parent::__construct($tagProperties); // parse the tag properties for text if (isset($tagProperties['FONT'])) { $this->font = $tagProperties['FONT']; } if (isset($tagProperties['FONTSTYLE'])) { $this->fontStyle = $tagProperties['FONTSTYLE']; } if (isset($tagProperties['FONTCOLOR'])) { $this->fontColor = $tagProperties['FONTCOLOR']; } if (isset($tagProperties['FONTSIZE'])) { $this->fontSize = $tagProperties['FONTSIZE']; } if (isset($tagProperties['TEXTALIGN'])) { $this->textAlign = $tagProperties['TEXTALIGN']; } if (isset($tagProperties['LINEHEIGHT'])) { $this->lineHeight = $tagProperties['LINEHEIGHT']; } }
/** * Constructor. * * Parse the tag properties * * @param array $attrs tag properties * @return void */ public function __construct($attrs) { parent::__construct($attrs); if (isset($attrs['FONT'])) { $this->font = $attrs['FONT']; } if (isset($attrs['FONTSIZE'])) { $this->fontSize = $attrs['FONTSIZE']; } if (isset($attrs['FONTSTYLE'])) { $this->fontStyle = $attrs['FONTSTYLE']; } if (isset($attrs['FONTCOLOR'])) { $this->fontColor = $attrs['FONTCOLOR']; } if (isset($attrs['FILL'])) { $this->fill = $attrs['FILL']; } if (isset($attrs['FILLCOLOR'])) { $this->fillColor = $attrs['FILLCOLOR']; } if (isset($attrs['BORDER'])) { $this->border = $attrs['BORDER']; } if (isset($attrs['BORDERCOLOR'])) { $this->borderColor = $attrs['BORDERCOLOR']; } if (isset($attrs['ALIGN'])) { switch (strtolower($attrs['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; } } if (isset($attrs['TEXTALIGN'])) { switch (strtolower($attrs['TEXTALIGN'])) { case 'l': case 'left': $this->textAlign = 'L'; break; case 'r': case 'right': $this->textAlign = 'R'; break; case 'c': case 'center': $this->textAlign = 'C'; break; case 'j': case 'justify': $this->textAlign = 'J'; break; } } if (isset($attrs['WIDTH'])) { $this->width = $attrs['WIDTH']; } if (isset($attrs['LINEHEIGHT'])) { $this->lineHeight = $attrs['LINEHEIGHT']; } if (isset($attrs['LEFT'])) { $this->left = $attrs['LEFT']; } if (isset($attrs['TOP'])) { $this->top = $attrs['TOP']; } if (isset($attrs['POSITION'])) { $this->position = $attrs['POSITION']; } }