Jump to content

Lining up fields


DragonHost

Recommended Posts

I have been heavily editing a template I purchased from somebody (regret doing it...design was fab but actual product had alot to be desired)...but the 1 issue I am having is with the product description/price fields not lining up with the rest of the layout.....they sit too far to the left.

 

Would anybody be able to help me?

 

Code as set out from the 2 columns above.

 

$pdf->SetDrawColor(0);

$pdf->SetFillColor(0);

$pdf->SetTextColor(255);

$pdf->SetFont('Arial','',8);

 

$pdf->Cell(50,7,"Total Amount Due",1,0,'L',1);

$pdf->Cell(30,7,$duedate,1,0,'L',1);

$pdf->Cell(30,7,$currencysymbol.$total,1,0,'R',1);$pdf->Ln();

 

$pdf->SetTextColor(0);

$pdf->SetXY(20,77);

 

$pdf->Cell(30,7,"Balance Brought Forward",0,0,'L',0);

$pdf->Cell(30,7,$currencysymbol.$balancebroughtforward,0,0,'R',0);$pdf->Ln();$pdf->Ln();

 

foreach ($invoiceitems AS $item) {

if (strlen($item["description"])>75) {

$numlines = ceil(strlen($item["description"])/75);

$cellheight = $numlines * 5;

$pdf->MultiCell(80,$cellheight,$item["description"],0,'L','',0);

$pdf->MultiCell(20,$cellheight,$currencysymbol.$item["amount"],0,'L','',0);

$pdf->SetXY(20,$pdf->GetY());

} else {

$pdf->Cell(80,2,$item["description"],0);

$pdf->Cell(30,2,$currencysymbol.$item["amount"],0,0,'R');

}

$pdf->Ln();

}

 

http://www.dragonhost.net.au/images/other/templateallign.JPG

Edited by bear
link instead of embed
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated