Index: pdf_helper.php =================================================================== --- pdf_helper.php (revision 13756) +++ pdf_helper.php (working copy) @@ -53,13 +53,27 @@ const DM_NORMAL = 0; const DM_SKIP = 1; - function BuildFromTemplate($template, $template_params = Array ()) + /** + * Allows to convert given template contents into pdf document + * + * @param string $template (template name OR it's contents, see $raw_template) + * @param Array $template_params + * @param bool $is_content + * @return string + */ + function BuildFromTemplate($template, $template_params = Array (), $is_content = false) { $this->Application->InitParser(); $this->Application->Parser->SetParams($template_params); - $xml = $this->Application->Parser->Run($template); + if ($is_content) { + $xml = $this->Application->Parser->Parse($template); + } + else { + $xml = $this->Application->Parser->Run($template); + } + $xml_helper =& $this->Application->recallObject('kXMLHelper'); /* @var $xml_helper kXMLHelper */