/** * Render the document. * * @param boolean $cache If true, cache the output * @param array $params Associative array of attributes * * @return string */ public function render($cache = false, $params = array()) { // mb_encoding foo when content-type had been set to text/html; uft-8; $this->_metaTags['http-equiv'] = array(); $this->_metaTags['http-equiv']['content-type'] = 'text/html'; // Testing using futural font. // $this->addStyleDeclaration('body: { font-family: futural !important; }'); $pdf = $this->engine; $data = parent::render(); FabrikPDFHelper::fullPaths($data); $pdf->load_html($data); $config = JComponentHelper::getParams('com_fabrik'); if ($config->get('pdf_debug', true)) { return $pdf->output_html(); } else { $pdf->render(); $pdf->stream($this->getName() . '.pdf'); } return ''; }
/** * Render the document. * @access public * @param boolean $cache If true, cache the output * @param array $params Associative array of attributes * @return string */ function render($cache = false, $params = array()) { $pdf = $this->engine; $data = parent::render(); $this->fullPaths($data); //echo $data;exit; $pdf->load_html($data); $pdf->render(); $pdf->stream($this->getName() . '.pdf'); return ''; }
/** * Render the document * * @param boolean $cache If true, cache the output * @param array $params Associative array of attributes * * @return string The rendered data * * @since 11.1 */ public function render($cache = false, $params = array()) { // If no error object is set return null if (!isset($this->_error)) { return; } // Set the status header \JFactory::getApplication()->setHeader('status', $this->_error->getCode() . ' ' . str_replace("\n", ' ', $this->_error->getMessage())); $file = 'error.php'; // Check template $directory = isset($params['directory']) ? $params['directory'] : 'templates'; $template = isset($params['template']) ? \JFilterInput::getInstance()->clean($params['template'], 'cmd') : 'system'; if (!file_exists($directory . '/' . $template . '/' . $file)) { $template = 'system'; } // Set variables $this->baseurl = \JUri::base(true); $this->template = $template; $this->debug = isset($params['debug']) ? $params['debug'] : false; $this->error = $this->_error; $params['params'] = \JFactory::getApplication()->getTemplate(true)->params; // Load $params['file'] = 'error.php'; $this->parse($params); $data = $this->_renderTemplate(); parent::render(); return $data; }
/** * Render the document. * * @param boolean $cache If true, cache the output * @param array $params Associative array of attributes * * @return string */ public function render($cache = false, $params = array()) { $pdf = $this->engine; $data = parent::render(); $this->fullPaths($data); $pdf->load_html($data); $config = JComponentHelper::getParams('com_fabrik'); if ($config->get('pdf_debug', true)) { return $pdf->output_html(); } else { $pdf->render(); $pdf->stream($this->getName() . '.pdf'); } return ''; }
/** * Render the document. * * @param boolean $cache If true, cache the output * @param array $params Associative array of attributes * * @return string */ public function render($cache = false, $params = array()) { // mb_encoding foo when content-type had been set to text/html; uft-8; $this->_metaTags['http-equiv'] = array(); $this->_metaTags['http-equiv']['content-type'] = 'text/html'; // Testing using futural font. // $this->addStyleDeclaration('body: { font-family: futural !important; }'); $pdf = $this->engine; $data = parent::render(); FabrikPDFHelper::fullPaths($data); /** * I think we need this to handle some HTML entities when rendering otherlanguages (like Polish), * but haven't tested it much */ $data = mb_convert_encoding($data, 'HTML-ENTITIES', 'UTF-8'); $pdf->load_html($data); $config = JComponentHelper::getParams('com_fabrik'); if ($config->get('pdf_debug', true)) { return $pdf->output_html(); } else { $pdf->render(); $pdf->stream($this->getName() . '.pdf'); } return ''; }