/** * tag : TEXTAREA * mode : OPEN * * @param array $param * @return boolean */ protected function _tag_open_TEXTAREA($param) { if (!isset($param['name'])) { $param['name'] = 'champs_pdf_' . (count($this->_lstField) + 1); } $param['name'] = strtolower($param['name']); if (isset($this->_lstField[$param['name']])) { $this->_lstField[$param['name']]++; } else { $this->_lstField[$param['name']] = 1; } $this->parsingCss->save(); $this->parsingCss->analyse('textarea', $param); $this->parsingCss->setPosition(); $this->parsingCss->fontSet(); $x = $this->pdf->getX(); $y = $this->pdf->getY(); $fx = 0.65 * $this->parsingCss->value['font-size']; $fy = 1.08 * $this->parsingCss->value['font-size']; // extract the content the textarea : value $level = $this->parsingHtml->getLevel($this->_parsePos); $this->_parsePos += count($level); // automatic size, from cols and rows properties $w = $fx * (isset($param['cols']) ? $param['cols'] : 22) + 1; $h = $fy * 1.07 * (isset($param['rows']) ? $param['rows'] : 3) + 3; $prop = $this->parsingCss->getFormStyle(); $prop['multiline'] = true; $prop['value'] = isset($level[0]['param']['txt']) ? $level[0]['param']['txt'] : ''; $this->pdf->TextField($param['name'], $w, $h, $prop, array(), $x, $y); $this->_maxX = max($this->_maxX, $x + $w); $this->_maxY = max($this->_maxY, $y + $h); $this->_maxH = max($this->_maxH, $h); $this->_maxE++; $this->pdf->setX($x + $w); return true; }