/** * creates the parameter object from the given parameter list * * @param String $param parameter list as string * @return CezShowimageParameter parameter object * @access public */ function create($param = '') { $obj = new CezShowimageParameter(); $obj->_parse($param); return $obj; }
/** * check for images an calculate their maximum width * * note: the image tags will be removed from the input text, this method is required due to further * calculation in the original pdf class * * @param String $text input text * @return float calculated maximum height * @access public */ function parseMaximumWidth(&$text) { $mx = 0; $matches = $this->getImagesFromText($text); for ($key = 0; $key < count($matches[0]); $key++) { $params =& CezShowimageParameter::create($matches[1][$key]); if ($params->getWidth() > $mx) { $mx = $params->getWidth(); } elseif ($params->getOriginalWidth() > $mx) { $mx = $params->getOriginalWidth(); } // remove the Image-Tag from the text for further calculation $text = str_replace($matches[0][$key], '', $text); } $mx = min($mx, $this->ezPdf->ez['pageWidth']); return $mx; }