So, I had struggled for a while before DOMPDF worked. May be you came here looking for a way out in joomla. I searched around, followed steps, most misled, got one from some site then later broke before finishing.
I wanted to install dompdf in Joomla 3 and below is what I did.
- Download PDF support Library First here. Install from the admin area as usual.
- Download DOMPDF as it is from here. Support class already installed, copy contents to sitename/libraries/dompdf/
- Now, we have to edit something little, as the library has some j2.5 stuff that will throw a fatal error if used as is, look for file /siteroot/components/com_fabrik/views/list/view.pdf.php on line 47, comment out
$this->doc->setPaper($size, $orientation);
- Head to /sitename/libraries/joomla/document/pdf/pdf.php just below line 147 where this line of code is $this->params->loadString($params); Add,
if (!defined('DS')) {
this will get rid of some notice errors about DS not defined.
define('DS','/');
} - Navigate to sitename/libraries/joomla/document/pdf/pdf.php and change
$site = $config->getValue( 'config.sitename' );
-
to
-
$site = $config->get('sitename');
- SAve. We are good to go.
Trust me you wanna avoid some errors in a live site, like below.