Jump to content

Packing Slip Layout


Recommended Posts

Thought I might write this for reference.

The packing slip generator is at classes/PDF.php

To make postcode appear after city on the address:
On line 333 and 334, you can replace this:

        $pdf->Cell($width, 10, $delivery_address->postcode.' '.Tools::iconv('utf-8', self::encoding(), $delivery_address->city), 0, 'L');
       $pdf->Cell($width, 10, $invoice_address->postcode.' '.Tools::iconv('utf-8', self::encoding(), $invoice_address->city), 0, 'L');



With this:

        $pdf->Cell($width, 10, $delivery_address->city.' '.Tools::iconv('utf-8', self::encoding(), $delivery_address->postcode), 0, 'L');
       $pdf->Cell($width, 10, $invoice_address->city.' '.Tools::iconv('utf-8', self::encoding(), $invoice_address->postcode), 0, 'L');



To increase font size of address:

On line 312 enter:

$pdf->SetFont(self::fontname(), '', 18);


where 18 is the font size.

And to change line spacing:

$pdf->Ln(5);


replace with:

$pdf->Ln(7);


where 7 is the line spacing.

And then for the phone numbers, on line 337 change

$pdf->Ln(5);

with something like

$pdf->Ln(9);

This adds more spacing between the address and phone numbers.

You can also change the size of the type for the phone numbers by adding on line 338, something like this:

        $pdf->SetFont(self::fontname(), '', 14);


where 14 is the font size.

Link to comment
Share on other sites

  • 3 months later...

I need for the shop address to show in the header of the pdf documents.... it kind of looks like in the code its suppose to but the programming is just a bit out of my grasp.

Can someone tell me if the address should already be displayed using the code that is there and if not, can someone show me how to move the address from the footer to the header?

Link to comment
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
×
×
  • Create New...