Question : FPDF PDF Generator Help

I am using FPDF to automatically create a PDF.

http://www.fpdf.org/

I need to do the following.

Get the Y axis coordinate then if the position is more than 200mm from the top of the page, add a new page.

$pdf->AddPage();

Can you please help me write this code? Thanks

Answer : FPDF PDF Generator Help

1:
2:
3:
4:
5:
6:
7:
8:
require('fpdf.php');
$pdf=new FPDF('P','mm','letter'); // instantiate with units=mm, paper size=letter (use 'A4' if non-US)
$pdf->AddPage();

// ... your content/loop/whatever here ...
if($pdf->GetY()>200)$pdf->AddPage(); // add page if Y>20cm from top left corner

$pdf->Output();
Random Solutions  
 
programming4us programming4us