al final lo solucione de la sgte manera
cree un popup
Código PHP:
var aWindow="";
function MM_openBrWindow(theURL,winName,features) {
if (aWindow == "")
aWindow=window.open(theURL,winName,features);
else{
if (aWindow.closed)
aWindow=window.open(theURL,winName,features);
else {
aWindow.focus();
aWindow.location = theURL
}
}
screen_height = window.screen.availHeight;
screen_height = window.screen.availHeight;
screen_width = window.screen.availWidth;
left_point = parseInt(screen_width/2)-(aWindow.innerWidth/2);
top_point = parseInt(screen_height/2)-(aWindow.innerHeight/2);
setTimeout('aWindow.moveTo(left_point,top_point)',100);
void(0);
};
despues de un link directo llamando a la funcion del popup con sus parametros respectivos
Código PHP:
<a href"#" onClick="<?php echo 'MM_openBrWindow(\'modulos/imprimirHospitalizados.php?hospitalizados='.$data[0].'\', \'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=100,height=100,left=50\');'; ?>">imprimir</a>
y finalmente la pagina del fpdf
Código PHP:
<?php
require('../fpdf/fpdf.php');
class PDF extends FPDF{
//Cabecera de página
function Header()
{
//Logo
//$this->Image('images/logo.png',85,8,33);
//Arial bold 15
$hospitalizados=$this->hospitalizados=$_GET['hospitalizados'];
$this->SetFont('Arial','B',15);
//Movernos a la derecha
$this->Cell(80);
//Título
$this->Cell(25,50,'Titulo',2,0,'C');
//Salto de línea
$this->Ln(30);
}
//Pie de página
function Footer()
{
//Posición: a 1,5 cm del final
$this->SetY(-15);
//Arial italic 8
$this->SetFont('Arial','I',8);
//Número de página
$this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');
}
}
//Creación del objeto de la clase heredada
$pdf=new PDF();
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont('Times','',12);
$pdf->MultiCell(100,10,"Subtitulo: $hospitalizados",2);
$pdf->Output();
?>
eso seria
chauuuu