Ver Mensaje Individual
  #9 (permalink)  
Antiguo 13/01/2013, 15:42
Avatar de satjaen
satjaen
 
Fecha de Ingreso: septiembre-2012
Ubicación: Jaén (Andalucía)
Mensajes: 893
Antigüedad: 11 años, 8 meses
Puntos: 10
Respuesta: No me salen acentos ni Nº en PDF

Cita:
Iniciado por loquemelate Ver Mensaje
En la Etiqueta <meta> cambiale el charset
y el iso pon el valor siguiente :

charset=iso-8859-1

ejemplo:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

INTENTALO
Si, pero donde lo pongo?

Código PHP:
<?php
require('fpdf.php');
$conexion=mysql_connect("localhost:3306","xxx","xxxxx");
mysql_select_db("xxxx");

$FInicio$_POST['FInicio']; 
$FFin $_POST['FFin'];
  
$consulta ="SELECT sbc.id_aviso, sbc.id_factura, sbc.telefonos,sbc.realizacion,sbc.recepcion,sbc.marcas,sbc.name,sbc.apellidos,sbc.calle,sbc.numero,sbc.edificio,sbc.puerta,sbc.piso,sbc.letra,sbc.localidad,sbc.provincia,sbc.dni,sbc.movil,sbc.aparatos,sbc.modelo,sbc.tecnico,sbc.serie,sbc.codigo,sbc.compra,
sbc.reparacion,sbc.entrada,sbc.salida,sbc.tiempo,sbc.material,sbc.obra,sbc.desplazamiento,sbc.base,sbc.iva,sbc.total  
FROM (    SELECT g.id_aviso, g.id_factura, g.telefonos,g.realizacion,g.recepcion,g.marcas,g.name,g.apellidos,g.calle,g.numero,g.edificio,g.puerta,g.piso,g.letra,g.localidad,g.provincia,g.dni,g.movil,g.aparatos,g.modelo,g.tecnico,g.serie,g.codigo,g.compra,
g.reparacion,g.entrada,g.salida,g.tiempo,g.material,g.obra,g.desplazamiento,g.base,g.iva,g.total  
FROM facturas g
UNION ALL
SELECT p.id_aviso, p.id_factura, p.telefonos,p.realizacion,p.recepcion,p.marcas,p.name,p.apellidos,p.calle,p.numero,p.edificio,p.puerta,p.piso,p.letra,p.localidad,p.provincia,p.dni,p.movil,p.aparatos,p.modelo,p.tecnico,p.serie,p.codigo,p.compra,
p.reparacion,p.entrada,p.salida,p.tiempo,p.material,p.obra,p.desplazamiento,p.base,p.iva,p.total  
FROM facturas_2011 p
UNION ALL
SELECT i.id_aviso, i.id_factura, i.telefonos,i.realizacion,i.recepcion,i.marcas,i.name,i.apellidos,i.calle,i.numero,i.edificio,i.puerta,i.piso,i.letra,i.localidad,i.provincia,i.dni,i.movil,i.aparatos,i.modelo,i.tecnico,i.serie,i.codigo,i.compra,
i.reparacion,i.entrada,i.salida,i.tiempo,i.material,i.obra,i.desplazamiento,i.base,i.iva,i.total  
FROM facturas_2012 i
) AS sbc 
WHERE sbc.realizacion
BETWEEN '$FInicio' AND '$FFin' ORDER BY id_factura"
;
$r=mysql_query($consulta);
$i=mysql_num_rows($r);
if (
$i>0){

        
$pdf=new FPDF('P','pt','A4');
    
$pdf->AddPage();
    
$pdf->SetFont('Arial','B',7);$pdf->Cell(20,10,'Resumen de facturación por técnico Nº2 y fecha',0,0,'L');$pdf->Cell(50,10,$registro[1],0,0,'C'); 
    
$k=1;

    while(
$registro=mysql_fetch_row($r)){
$pdf->SetFont('Arial','B',6);
$pdf->Ln();
$pdf->SetFont('Arial','B',6);$pdf->Cell(20,10,'NºFactura:',0,0,'L');$pdf->Cell(50,10,$registro[1],0,0,'C');  
$k=1;   
$pdf->SetFont('Arial','B',6);
$pdf->Cell(32,10,'NºAviso: ',0,0,'L');$pdf->SetFont('Arial','I',6);$pdf->Cell(50,10,$registro[0],0,0,'L');$pdf->SetFont('Arial','B',6);$pdf->Cell(45,10,'F.Realización:',0,0,'L');
$pdf->SetFont('Arial','I',6);$pdf->Cell(50,10,$registro[3],0,0,'L');
$pdf->Ln();
$pdf->SetFont('Arial','B',6);$pdf->Cell(25,10,'Nombre: ',0,0,'L');$pdf->SetFont('Arial','I',6);$pdf->Cell(80,10,$registro[6],0,0,'L');
$pdf->Cell(80,10,$registro[7],0,0,'L');$pdf->SetFont('Arial','B',6); $pdf->Cell(15,10,'DNI: ',0,0,'L');$pdf->SetFont('Arial','I',6);$pdf->Cell(40,10,$registro[16],0,0,'L'); 
$pdf->SetFont('Arial','B',6);$pdf->Cell(15,10,'Telf: ',0,0,'L');$pdf->SetFont('Arial','I',6);$pdf->Cell(40,10,$registro[2],0,0,'L');
$pdf->SetFont('Arial','B',6);$pdf->Cell(30,10,'Aparato: ',0,0,'L');$pdf->SetFont('Arial','I',6);$pdf->Cell(60,10,$registro[18],0,0,'L');
$pdf->SetFont('Arial','B',6);$pdf->Cell(25,10,'Marca: ',0,0,'L');$pdf->SetFont('Arial','I',6);$pdf->Cell(62,10,$registro[5],0,0,'L');
$pdf->SetFont('Arial','B',6);$pdf->Cell(25,10,'Modelo:',0,0,'L');$pdf->SetFont('Arial','I',6);$pdf->Cell(60,10,$registro[19],0,0,'L');
$pdf->Ln();  
$pdf->SetFont('Arial','B',6);$pdf->Cell(35,10,'Dirección:',0,0,'L');$pdf->SetFont('Arial','I',6);$pdf->Cell(180,10,$registro[8],0,0,'L');$pdf->SetFont('Arial','B',6);
$pdf->SetFont('Arial','B',6);$pdf->Cell(35,10,'Localidad:',0,0,'L');$pdf->SetFont('Arial','I',6);$pdf->Cell(135,10,$registro[14],0,0,'L');
$pdf->SetFont('Arial','B',6);$pdf->Cell(30,10,'NºSerie:',0,0,'L');$pdf->SetFont('Arial','I',6);$pdf->Cell(55,10,$registro[21],0,0,'L');
$pdf->SetFont('Arial','B',6);$pdf->Cell(30,10,'F.compra:',0,0,'L');$pdf->SetFont('Arial','I',6);$pdf->Cell(60,10,$registro[23],0,0,'L');
$pdf->Ln();
$pdf->SetFont('Arial','B',6);$pdf->Cell(35,10,'Técnico: ',0,0,'L');$pdf->SetFont('Arial','I',6);$pdf->Cell(40,10,$registro[20],0,0,'L');
$pdf->SetFont('Arial','B',6);$pdf->Cell(30,10,'Material:',0,0,'L');$pdf->SetFont('Arial','I',6);$pdf->Cell(40,10,$registro[28],0,0,'L');
$pdf->SetFont('Arial','B',6);$pdf->Cell(45,10,'Mano de obra:',0,0,'L');$pdf->SetFont('Arial','I',6);$pdf->Cell(40,10,$registro[29],0,0,'L');    
$pdf->SetFont('Arial','B',6);$pdf->Cell(50,10,'Desplazamiento:',0,0,'L');$pdf->SetFont('Arial','I',6);$pdf->Cell(40,10,$registro[30],0,0,'L');    
$pdf->SetFont('Arial','B',6);$pdf->Cell(20,10,'Base:',0,0,'L');$pdf->SetFont('Arial','I',6);$pdf->Cell(40,10,$registro[31],0,0,'L');    
$pdf->SetFont('Arial','B',6);$pdf->Cell(20,10,'Iva:',0,0,'L');$pdf->SetFont('Arial','I',6);$pdf->Cell(40,10,$registro[32],0,0,'L');    
$pdf->SetFont('Arial','B',6);$pdf->Cell(20,10,'Total:',0,0,'L');$pdf->SetFont('Arial','I',6);$pdf->Cell(40,10,$registro[33],0,0,'L');
$pdf->Line(570383038);
$pdf->Line(570853085);    
$pdf->Line(57013030130);
$pdf->Line(57018030180);
$pdf->Line(57023030230);
$pdf->Line(57029030290);
$pdf->Line(57034030340);
$pdf->Line(57040030400);
$pdf->Line(57045030450);
$pdf->Line(57050030500);
$pdf->Line(57056030560);
$pdf->Line(57061030610);
$pdf->Line(57067030670);
$pdf->Line(57073030730);
$pdf->Line(57078030780);
$pdf->Ln(14);
}
    
$pdf->Output();

}
mysql_close();

?>