require('fpdf.php');
class PDF extends FPDF
{
//Cabecera de página
function Header()
{
//Logo
$this->Image('http://www.westationery.com/wp-content/themes/zWenju/images/pdf.jpg',0,0,210);
$this->Ln(15);
}
//Pie de página
function Footer()
{
$this->SetY(-10);
$this->SetFont('Arial','I',8);
$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->Image($imgArray[0],10,25+($i-1)*44,37,37,'',get_permalink($post->ID));
$pdf->SetX(53);
$pdf->Cell(43,7,'Model No.:'.get_post_meta($post->ID, "model_no", true),1,0);
//$this->SetX(110);
$pdf->Cell(105,7,str_replace('″','"',get_the_title()),1,1);
$pdf->SetX(53);
$pdf->Output('we.pdf','I');
?>