Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Sign in to follow this  

Shipping Label via PDF

Recommended Posts

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";


$line4="$city" . ', ' . "$state ";





$pdf=new FPDF('L','mm',array(54, 101));


$pdf->SetXY('5', '3');





$pdf->Cell(0,4,'Ship to:-',0,1);






if($line2 != ''){





if($line5 != 'United States'){



Share this post

Link to post
Share on other sites

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.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this