PrestaShop 1.4.x uses a free PDF class called FPDF which generates PDF files using PHP scripting language. More about it’s features and tutorials can be found here: http://www.fpdf.org/ . Here is a simple example on editing the PDF invoice template. Let’s say you wanted to add some text below the totals of the of the pdf invoice.
Step 1) Open file classes/PDF.php
Step 2) Find the footer() function, in the footer function at beginning add the follow code:
$this->Ln(); $text = "Thank you for your order"; $this->SetFont('Arial', 'B', 8); $this->MultiCell(190, 5, $text, 0, 'L', false); $this->Ln();
The MultiCell function prints text with line breaks. It’s Paramters are (width, height, text, border (0,1), align (L,R,C,J), fill cell background (false,true)
Need help to do custom invoice pdf changes? Please contact us a for a quote: