FriendsOfCake/CakePdf

Getting Error in CakePdf 1.0.3 using with cakephp 2.x

sunilj143 opened this issue · 0 comments

Getting This type of Error please help me to resolve this
i am using dompdf engine

Bootstrap Configuration
CakePlugin::load('CakePdf', array('bootstrap' => true, 'routes' => true));
Configure::write('CakePdf', array(
'engine' => 'CakePdf.dompdf',
'pageSize' => 'A4',
'orientation' => 'portrait'
));
And Using Both
1: Render as PDF (including forced download) in the browser with PdfView
2: Create PDF for email attachment, file storage etc.

$this->pdfConfig = array(
'download' => false,
'filename' => 'category_'.$id
);
$CakePdf = new CakePdf();
$CakePdf->viewVars(compact('category'));
$CakePdf->template('view', 'default');
//get the pdf string returned
$pdf = $CakePdf->output();
//or write it to file directly

$pdf = $CakePdf->write(APP . 'files' . DS . 'category_' . $id .'.pdf');

But getting all this erros.

Warning (2): DOMXPath::query(): Invalid expression [APP\Plugin\CakePdf\Vendor\dompdf\include\stylesheet.cls.php, line 615]
Warning (2): DOMXPath::query() [domxpath.query]: Invalid expression [APP\Plugin\CakePdf\Vendor\dompdf\include\stylesheet.cls.php, line 615]
Warning (2): Invalid argument supplied for foreach() [APP\Plugin\CakePdf\Vendor\dompdf\include\stylesheet.cls.php, line 617]
Warning (2): DOMXPath::query() [domxpath.query]: Invalid expression [APP\Plugin\CakePdf\Vendor\dompdf\include\stylesheet.cls.php, line 615]
Warning (2): DOMXPath::query() [domxpath.query]: Invalid expression [APP\Plugin\CakePdf\Vendor\dompdf\include\stylesheet.cls.php, line 615]
Warning (2): Invalid argument supplied for foreach() [APP\Plugin\CakePdf\Vendor\dompdf\include\stylesheet.cls.php, line 617]
Warning (2): DOMXPath::query() [domxpath.query]: Invalid expression [APP\Plugin\CakePdf\Vendor\dompdf\include\stylesheet.cls.php, line 615]
Warning (2): DOMXPath::query() [domxpath.query]: Invalid expression [APP\Plugin\CakePdf\Vendor\dompdf\include\stylesheet.cls.php, line 615]
Warning (2): Invalid argument supplied for foreach() [APP\Plugin\CakePdf\Vendor\dompdf\include\stylesheet.cls.php, line 617]
Warning (2): DOMXPath::query() [domxpath.query]: Invalid expression [APP\Plugin\CakePdf\Vendor\dompdf\include\stylesheet.cls.php, line 615]
Warning (2): DOMXPath::query() [domxpath.query]: Invalid expression [APP\Plugin\CakePdf\Vendor\dompdf\include\stylesheet.cls.php, line 615]
Warning (2): Invalid argument supplied for foreach() [APP\Plugin\CakePdf\Vendor\dompdf\include\stylesheet.cls.php, line 617]
Warning (2): DOMXPath::query() [domxpath.query]: Invalid expression [APP\Plugin\CakePdf\Vendor\dompdf\include\stylesheet.cls.php, line 615]
Warning (2): DOMXPath::query() [domxpath.query]: Invalid expression [APP\Plugin\CakePdf\Vendor\dompdf\include\stylesheet.cls.php, line 615]
Warning (2): Invalid argument supplied for foreach() [APP\Plugin\CakePdf\Vendor\dompdf\include\stylesheet.cls.php, line 617]
Warning (2): DOMXPath::query() [domxpath.query]: Invalid expression [APP\Plugin\CakePdf\Vendor\dompdf\include\stylesheet.cls.php, line 615]
Warning (2): DOMXPath::query() [domxpath.query]: Invalid expression [APP\Plugin\CakePdf\Vendor\dompdf\include\stylesheet.cls.php, line 615]
Warning (2): Invalid argument supplied for foreach() [APP\Plugin\CakePdf\Vendor\dompdf\include\stylesheet.cls.php, line 617]%PDF-1.3 1 0 obj << /Type /Catalog /Outlines 2 0 R /Pages 3 0 R /OpenAction 8 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj << /Type /Pages /Kids [6 0 R ] /Count 1 /Resources << /ProcSet 4 0 R /Font << /F1 9 0 R