Hola
Si, generé el reporte de otra manera, usando tcpdf, desde una aplicación blank.
Te paso el código (seguramente, podes adaptarlo)
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 1 Jul 2000 05:00:00 GMT"); // Fecha en el pasado
sc_include_lib('tcpdf');
sc_include_library("prj","report_pdf","informes.php",true,true);
//ob_start();
ob_start(null, 0, PHP_OUTPUT_HANDLER_CLEANABLE ^ PHP_OUTPUT_HANDLER_REMOVABLE);
error_reporting(E_ALL & ~E_NOTICE);
ini_set('display_errors', 0);
ini_set('log_errors', 1);
// Criar um Novo Documento PDF
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
$Cod_InformeCaso = [Cod_InformeCaso];
$Destino = [Destino];
if ($Destino <> 'F') {
$Destino = 'I';
}
if ($Destino == 'F') {
$Destino = 'FD';
}
//$Cod_InformeCaso = 3247;
//$Destino = 'I';
$pdf->SetCreator(PDF_CREATOR);
$sqlaux = 'Select Pac.NOMBRE, Med.NOMBRE, Din.DESCRIPCION, Ica.Mes, Ica.Ano From dbo.InformesCasos as Ica Inner Join dbo.CasosPersonal as Cpe ON Cpe.COD_CASOPERSONAL = Ica.COD_CASOPERSONAL Inner Join dbo.Medicos as Med On Med.COD_MEDICO = Cpe.COD_MEDICO
Inner Join dbo.DefinicionInformes as Din on Din.COD_DEFINICIONINFORME = Ica.COD_DEFINICIONINFORME Inner Join dbo.Pacientes AS Pac On Pac.COD_PACIENTE = Cpe.COD_PACIENTE Where Ica.COD_INFORMECASO = '.$Cod_InformeCaso;
sc_lookup(rsAux, $sqlaux);
if(count({rsAux}) != 0) {
$pdf->SetAuthor(trim({rsAux[0][1]}));
$pdf->SetTitle(trim({rsAux[0][2]}).' - '.trim({rsAux[0][0]}).' - '.{rsAux[0][3]}.'-'.{rsAux[0][4]});
$pdf->SetSubject(trim({rsAux[0][0]}));
} else {
$pdf->SetAuthor('Atañer');
$pdf->SetTitle('Informe');
$pdf->SetSubject('Informe');
}
$pdf->SetKeywords('Informe');
$pdf->AddPage('P','A4'); //A4 Portrait
// Definição das Magens
$pdf->SetMargins(20, 37, 15,10);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// Definição da Quebra de Pagina Automática
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// Definição da Escala de Imagem
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
// Definição das Fontes
$pdf->SetFont('helvetica', '', 10, '', true);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
$pdf->setCellMargins($left = 15, $top = 10, $right = 10, $bottom = 15);
$pdf->setFontSubsetting(false);
$pdf->SetFont('helvetica', '', 11, '', false);
$Auxiliar = "";
$sqlaux = "SELECT TITULO,VALOR,NROORDEN,INCLUYETITULO,OBLIGATORIO FROM dbo.DetalleInformeCaso Where Cod_InformeCaso = ".$Cod_InformeCaso." Order By NroOrden";
sc_lookup(rsAux, $sqlaux);
foreach({rsAux} as $cat) {
$bandera = 0;
if (!empty(trim($Auxiliar))) {
$Auxiliar = trim($Auxiliar)."<br><br>";
}
if ($cat[3] = 1) {
$Auxiliar = trim($Auxiliar).trim($cat[0]);
$bandera = 1;
}
if (!empty(trim($cat[1]))) {
if ($bandera == 1) {
$Auxiliar = trim($Auxiliar)."<br><br>";
}
$Auxiliar = trim($Auxiliar).trim($cat[1]);
}
}
$Auxiliar = trim($Auxiliar).'<br><br><span style="text-align: rigth"><img src="../_lib/img/firma.jpg" width="181" height="199"></span>';
$pdf->SetFont('helvetica', '', 11, '', false);
$pdf->writeHTMLCell(190, 0, 0, $y=30, trim($Auxiliar), $border=0, $ln=0, $fill=0, $reseth=true, $align='', $autopadding=true);
ob_end_clean();
$array_ini = parse_ini_file("..\\Config.ini");
$CaminoDocs = $array_ini['Temporal'];
$at_path=$this->Ini->path_doc;
$doc_name = str_pad($Cod_InformeCaso, 8, "0", STR_PAD_LEFT);
$filename = $CaminoDocs."/doc-".$doc_name.".pdf";
//echo $filename;
$pdf->Output($filename,$Destino);