J2.5 talk

Creating PDF views

(Redirected from Talk:How to create PDF views)

Has anyone tested this method on Joomla! 2.5? EDIT: tested on Joomla! 2.5 and working fine.

Messy code in Chinese environment

I have tested this articel in my j25 site. Everything work fine.But when I want output some Chinese char to pdf file. the page goes wrong. The Chinese char to be messy code.

I don't konw how to solve this.

You might need to install a Unicode font in DOMPDF (do a search on "dompdf unicode" for examples of how to do that

Also try this for the render function:

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();
		$pdf->stream($this->getName() . '.pdf');

		return '';

I'm sorry but J2.5 is EOS (End of Support) so any fixes for this issue will not be fixed. Tom Hutchison (talk) 08:07, 18 April 2015 (CDT)

Thanks very much!