Good day I am from Venezuela friends got into this world alone and cakephp me happy but I have a problem ayenme please.
I CakePdf use the plugin and have problems with a pdf.
this is my code in the controller
public function reporte_factura_pdf($marca, $referencia, $fecha1, $fecha2) {
//public function reporte_factura_pdf() {
$this->loadModel('Norma', 'RequestHandler');
$this->loadModel('Referencia', 'RequestHandler');
$this->loadModel('Articulo', 'RequestHandler');
$this->loadModel('ArticulosFacturas', 'RequestHandler');
$this->loadModel('Facturas', 'RequestHandler');
//$facturas=$this->params->params['array_fac'];
$options[] = array(
'and' => array(
array('fecha <= ' => $fecha2,
'fecha >= ' => $fecha1
)));
$this->pdfConfig = array(
'download' => true,
'filename' => 'user_' . 18 .'.pdf'
);
$array_fac=$this->Factura->find('all', array('recursive' => -1,'fields' => array('Factura.id','Factura.fecha', 'Articulo.norma_id', 'Articulo.referencia_id','Art_Fac.cantidad', 'Marca.descripcion', 'Referencia.nombre',), 'joins' => array(
array(
'table' => 'articulos',
'alias' => 'Articulo',
'type' => 'INNER'
),
array(
'table' => 'normas',
'alias' => 'Marca',
'type' => 'INNER',
'conditions' => array(
'Marca.id = Articulo.norma_id'
)),
array(
'table' => 'referencias',
'alias' => 'Referencia',
'type' => 'INNER',
'conditions' => array(
'Referencia.id = Articulo.referencia_id'
)),
array(
'table' => 'articulos_facturas',
'alias' => 'Art_Fac',
'type' => 'INNER',
'conditions' => array(
'Art_Fac.articulo_id = Articulo.id',
'Art_Fac.factura_id = Factura.id'
))
), 'conditions' => $options));
$this->set('facturas', $array_fac);
/*
$this->set('marca', $marca);
$this->set('referencia', $referencia);
$this->set('fecha1', $fecha1);
$this->set('fecha2', $fecha2);
*/
}
And my view has only one debug ($facturas).
Warning (2): DOMNode::cloneNode() [domnode.clonenode]: ID content already defined [APP\Plugin\CakePdf\Vendor\dompdf\include\frame_decorator.cls.php, line 364]
and
%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 13 0 R 15 0 R ] /Count 3 /Resources << /ProcSet 4 0 R /Font << /F1 9 0 R /F2 11 0 R /F3 12 0 R /F4 17 0 R >> /XObject << /I1 10 0 R /I2 18 0 R >> >> /MediaBox [0.000 0.000 612.000 792.000] >> endobj 4 0 obj [/PDF /Text /ImageC ] endobj