Example #1
0
                    $this->Cell(100, 7, $datos[$i], 0, 0, 'L', 1);
                } else {
                    $this->Cell(40, 7, $datos[$i], 0, 0, 'L', 1);
                }
                $salto++;
                if ($salto == $num) {
                    $this->Ln();
                    $salto = 0;
                    $color = true;
                }
            }
        }
    }
}
$client = new SoapClient(null, array('uri' => 'http://localhost/', 'location' => 'http://localhost/p/OCS/consola/web/webservice.php'));
$idCliente = $client->id_cliente($cliente);
if ($filtro == 1 || $filtro == 2) {
    $datos = $client->consulta_mas($idCliente[0], $marca);
}
if ($filtro == 3) {
    $datos = $client->consulta_menos($id_cliente[0], $marca);
}
$nombre = "<b>Descripción del reporte</b>";
$descripcion = "<b>Marca: </b>" . $marca;
$cliente = "<b>Cliente: </b>" . $cliente;
$img = "imagenes/log.jpg";
$header = array('Nombre', 'Marca', 'Precio');
//Antes de pasar los datos al PDF, hay que pasar las variables por la función html_entity_decode para decodificar los caracteres especiales, los acentos y las ñ
// Siempre y cuando los datos extraídos de la BD sean UTF8 (no lo probe con otra codificación)
$nombre = html_entity_decode($nombre);
$descripcion = html_entity_decode($descripcion);