Hi
I'm trying to write a label printing routine, but I'm not being too sucsessful. I'm hoping maybe someone who's used FPDF b4 can help me out?
Basically, I want to print labels from a data taken from a MySQL DB, but it doesn't output the labels properly. As soon as it gets to the bottom of the page, it kinda spans the bottom two labels across the two pages. How do I tell it to print the whole last label on the second page? I had a look at the docs, but can't seem to get anything that'll help me.
[PHP]
include_once("c lasses/fpdf.php");
define('FPDF_FO NTPATH','classe s/font/');
$pdf=new FPDF('P','mm',$ _GET['paper_size']);
$pdf->SetDisplayMode (fullpage);
$pdf->AddPage();
$pdf->SetFont('Arial ','B',12);
$pdf->SetAutoPageBre ak('on');
$pdf->SetTopMargin(0 );
$pdf->SetLeftMargin( 0);
$a = $row['name'];
$b = "Expires: ".$row['expire'];
$c = "Take ".$row['dosage'];
$d = "No ".$no." / Pages ".$pages;
$e = $_GET['l_gap']." / ".$_GET['t_gap']." / ".$_GET['width']." / ".$_GET['height'];
$width =$_GET['l_gap'];
$height =$_GET['t_gap'];
for($i=1; $i<$_GET['label_quantity ']; $i++) {
//$width = $width+$width+$ _GET['v_gap'];
$height = $Ypos+$_GET['h_gap'];
//First Column
$pdf->SetXY($width,$ height);
$pdf->MultiCell($_GE T['width'], $_GET['height']/10 ,$pdf->GetX()." / ".$pdf->GetY(). " ".$a."\n".$b."\ n".$c."\n".$d." \n".$e." #".$i , 1,'L');
$Ypos = $pdf->GetY();
//Second Column
//$pdf->SetXY($_GET['l_gap']+$_GET['width']+$_GET['v_gap'],$height);
//$pdf->MultiCell($_GE T['width'], $_GET['height']/10 ,$pdf->GetX()." / ".$pdf->GetY(). " ".$a."\n".$b."\ n".$c."\n".$d." \n".$e." #".$i , 1,'L');
}
$pdf->Output();[/PHP]
My other problem, which I don't know howto address yet, is how would I be able to print a few labels next to each other?
tia :)