gillamb Posted September 3, 2006 Posted September 3, 2006 I installed the above contribution fine, but the layout is not how I would like it. Does anyone know how i can change the layout, I need to :- Create a gap between the lines Make the address fill the label (not like currently squashed up in the top!) Make the Town and County appear on separate lines Below is the code that i think is controlling this, but i can't see how to change the layout. Any help much appreciated! $postcode = tep_output_string_protected($address['postcode']); $zip = $postcode; $line1= "$firstname $lastname"; $line2= "$company"; $line3="$street"; $line4="$city" . ', ' . "$state "; $line5="$zip"; $line6="$country"; define('FPDF_FONTPATH','font/'); require('fpdf.php'); $pdf=new FPDF('L','mm',array(54, 101)); $pdf->AddPage(); $pdf->SetXY('5', '3'); $pdf->SetMargins('0','0','0'); $pdf->SetFont('Arial','Bi',15); $pdf->Cell(40,4,'',0,1); $pdf->SetX('15'); $pdf->Cell(0,4,'Ship to:-',0,1); $pdf->SetX(15); $pdf->SetFont('Arial','',12); $pdf->SetX(15); $pdf->SetFont('Arial','',15); $pdf->Cell(40,4,"$line1",0,4); if($line2 != ''){ $pdf->Cell(40,4,"$line2",0,2); } $pdf->Cell(40,4,"$line3",0,2); $pdf->Cell(40,4,"$line4",0,2); if($line5 != 'United States'){ $pdf->Cell(40,4,"$line5",0,2); //$pdf->Cell(40,4,"$line6",0,2); Quote
radders Posted September 3, 2006 Posted September 3, 2006 Some of the pdf stuff is a bit counter-intuitive. For example is you are working on a A4 page then the top right hand corner of the page is roughly co-ordinate (410, 590) and the bottom left hand corner is (0, 0). Some of the functions work with absolute positioning and others just move to the next line each time. See Batch Print Center for more examples. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.