Hola a todos
estoy usando fpdf para generar archivos pdfs que los muestro directamente. Las pruebas las he hecho con chrome, firefox e IE 8. El problema que al ejecutar el archivo php que muestra el pdf en el IE me sale este error:
Internet Explorer no puede mostrar la página web
El codigo que uso en el php es el siguiente:
Código PHP:
<?php
session_start();
$pEmpresaConectada = $_SESSION['USER_CONN_EMPRESA'];
//include('../config/seguridad.php');
include('../config/conect.php');
include('../config/process.php');
require('../config/fpdf/fpdf.php');
$con = conexion();
$pdf=new FPDF('L',"mm","Legal");
$pdf->AddPage();
$f=0;
$pProceso="";
$pAsunto="";
$pActividad="";
$pResponsable="";
$pFecha="";
$pDesde="";
$pHasta="";
//header('Content-Disposition: inline; filename="'.$filename.'"');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Pragma: public');
insEstadistica("", "", "GESTION", "GESTION PDF");
if (isset($_GET["PROCESO"])){
$pProceso = $_GET["PROCESO"];
}
if (isset($_REQUEST["DESDE"])){
$pDesde = $_REQUEST["DESDE"];
}else{
$pDesde = "01-" .$mes ."-" .$ano;
}
if (isset($_REQUEST["HASTA"])){
$pHasta = $_REQUEST["HASTA"];
}else{
$pHasta = $fecha;
}
if (isset($_GET["RESPONSABLE"])){
$pResponsable = $_GET["RESPONSABLE"];
}
if (isset($_GET["ACTIVIDAD"])){
$pActividad = $_GET["ACTIVIDAD"];
}
if($pDesde!=""){
if($pHasta=="")
$pHasta=$pDesde;
$pFecha = " and fecha between '" .dateYMD($pDesde) ."' and '" .dateYMD($pHasta) ."'";
}
$where = "";
if($pProceso!= ""){
$where .= " and " ."proceso = '$pProceso'";
}
if($pAsunto!= ""){
$where .= " and " ."msj_asunto like '%$pAsunto%' ";
}
if ($pFecha!=""){
$where .= $pFecha;
}
if($pResponsable!= ""){
$where .= " and msj_rutactual='$pResponsable' ";
}
if($pActividad!= ""){
$where .= " and " ."actividad like '%$pActividad%' ";
}
mysql_query ("SET NAMES 'utf8'");
$sql = "";
mysql_query ("SET NAMES 'utf8'");
$sql =$sql ."SELECT g.msj_id, g.empresa, g.mensaje, g.carpeta, g.asunto, g.proceso, g.msj_rutcreador, g.msj_fecha_creacion, fecha_full, g.user_actual, g.msj_rutactual, g.msj_fecha_modif, g.msj_etapa, g.msj_estado, g.actividad FROM gestion g WHERE empresa=$pEmpresaConectada " .$where;
?>
<?php
$debe=0;
$haber=0;
$d=0;
$h=0;
//Leemos y escribimos los registros de la página actual
$result=mysql_query($sql);
//echo $sql;
$pdf->SetFillColor(256,256,256);
$pdf->SetFont('Arial','B',20);
$pdf->Cell(330,16,utf8_decode("Gestión"),0,1,'C',1);
$alt=6;
$pdf->SetFont('Arial','b',12);
$pdf->Cell(25,$alt,"Reg.",1,0,'L',1);
$pdf->Cell(125,$alt,"Asunto",1,0,'L',1);
$pdf->Cell(60,$alt,"Actividad",1,0,'L',1);
$pdf->Cell(60,$alt,"Responsable",1,0,'L',1);
$pdf->Cell(30,$alt,"Fecha",1,0,'R',1);
$pdf->Cell(30,$alt,"Estado",1,1,'R',1);
while($row = mysql_fetch_array($result)){
if($f==0){
$pdf->SetFillColor(230,230,230);
$f=1;
}else{
$pdf->SetFillColor(256, 256,256);
$f=0;
}
$pdf->SetFont('Arial','',10);
$pdf->Cell(25,$alt,$row['msj_id'] ,1,0,'L',1);
$pdf->Cell(125,$alt,$row['asunto'],1,0,'L',1);
$pdf->Cell(60,$alt,$row['actividad'],1,0,'L',1);
$pdf->Cell(60,$alt,$row['user_actual'],1,0,'L',1);
$pdf->Cell(30,$alt,$row['fecha_full'],1,0,'R',1);
$pdf->Cell(30,$alt,$row['msj_estado'],1,1,'R',1);
}
$pdf->SetDisplayMode(75);
$pdf->Output();
mysql_close($con);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Minuta</title>
<link href="../hoja_estilo.css" rel="stylesheet" type="text/css" />
</head>
<body>
</body>
</html>
Alguien me puede ayudar a solucionar el problema
Gracias