How can I get height and width of a document in FPDF.
For example, I've next line:
$this->Cell(200,5,'ATHLETIC DE COLOMBIA S.A.',1,1,'C',1);
But, I want to do something like:
// $x = width of page
$this->Cell($x,5,'ATHLETIC DE COLOMBIA S.A.',1,1,'C',1);
Needed to do this myself so was just checking the most recent version of FPDF and it looks like the width & height are already available as public properties. So for anyone looking for the same info:
$pdf = new FPDF();
$pdf->addPage("P", "A4");
$pdf -> w; // Width of Current Page
$pdf -> h; // Height of Current Page
$pdf -> Line(0, 0, $pdf -> w, $pdf -> h);
$pdf -> Line($pdf -> w, 0, 0, $pdf -> h);
$pdf->Output('mypdf.pdf', 'I');