Reputation: 679
UPDATE1: Works pretty well on Ubuntu but not on CentOS.
I have a issue with the DOMPDF on CentOS Linux VPS,
I output an HTML with css on my WAMPP and works pretty well:
But when i upload the same code, the same html it shows as this:
I tried everything like check encoding, inline css, enabling remote but still no way to get this running, here is my code:
require_once(APP . 'vendors' . DS . 'dompdf' . DS . 'dompdf_config.inc.php');
spl_autoload_register('DOMPDF_autoload');
$dompdf = new Dompdf();
def("DOMPDF_ENABLE_REMOTE", true);
$_GET['print'] = 1;
$dompdf->set_paper("A4", "portrait");
$this->output = '';
$this->layout = 'none';
$old_output = $this->output;
$this->render('innobra_pdf');
$new_output = $this->output;
$dompdf->load_html($new_output);
// $dompdf->load_html( utf8_decode($new_output), Configure::read('App.encoding') );
$dompdf->render();
$output = $dompdf->output();
header('Content-type: application/pdf');
echo $output; die();
What i'm doing wrong ?
Thanks
Upvotes: 1
Views: 1258
Reputation: 4854
If you have copied to another server, try deleting the file
dompdf/lib/fonts/dompdf_font_family_cache.php
Upvotes: 2