I have this code and when I save the pdf I get some strange letters. someone who can help me with this.
<?php
if(strlen($_GET['desde'])>0 and strlen($_GET['hasta'])>0){
$desde = $_GET['desde'];
$hasta = $_GET['hasta'];
$verDesde = date('d/m/Y', strtotime($desde));
$verHasta = date('d/m/Y', strtotime($hasta));
}else{
$desde = '1111-01-01';
$hasta = '9999-12-30';
$verDesde = '__/__/____';
$verHasta = '__/__/____';
}
require('../fpdf/fpdf.php');
require('conexion.php');
$pdf = new FPDF();
header("Content-Type: text/html; charset=iso-8859-1 ");
$pdf->AddPage();
$pdf->SetFont('Arial', '', 10);
$pdf->Image('../recursos/civil.jpg' , 130 ,5, 70 , 25,'jpg');
$pdf->Cell(50, 10, 'Hoy: '.date('d-m-Y').'', 0);
$pdf->Ln();
$pdf->Ln();
$pdf->Cell(70, 8, '', 0);
$pdf->Cell(100, 8, 'LISTADO DE EMERGENCIAS', 0,'C');
$pdf->Ln();
$pdf->Cell(60, 8, '', 0);
$pdf->Cell(100, 8, 'Desde: '.$verDesde.' hasta: '.$verHasta, 0);
$pdf->Ln(23);
$pdf->SetFont('Arial', 'B', 8);
//CONSULTA
$productos = mysql_query("SELECT * FROM reporte WHERE fecha_reporte
BETWEEN '$desde' AND '$hasta' ");
$item = 0;
$totaluni = 0;
$totaldis = 0;
while($productos2 = mysql_fetch_array($productos)){
$item = $item+1;
$pdf->Cell(190, 8,'Clave:'.$productos2['id'], 1,1,'C');
$pdf->Cell(190, 8,'Emergencia: '.$productos2['nombre'], 1,1,'');
$pdf->Cell (190, 8,'Descripción: '.$productos2['desc_emergencia'], 1,1,'');
$pdf->Cell(190, 8,'Nombre del reportante: '
.$productos2['nombre_reportante'],1,1,'');
$pdf->Cell(190, 8,'Teléfono: '.$productos2['telefono_reportante'], 1,1,'');
$pdf->Cell(190, 8,'Ubicación: ' .$productos2['ubicacion'],1,1,'');
$pdf->Cell(190, 8,'Nivel de emergencia: '
.$productos2['nivel_emergencia'],1,1,'');
$pdf->Cell(190, 8, 'Fecha que se realizó esta emergencia: ' .date('d/m/Y',
strtotime($productos2['fecha_reporte'])),1,1,'');
$pdf->Ln(10);
}
$pdf->Output('reporte.pdf','D');
?>