Jump to content

Prestashop invoice


cikcak

Recommended Posts

Hey,

 

I would like to make invoice footer same size as header. Im trying to edit classes/pdf/PDFGenerator.php margins but can`t achieve same result.

 

        $this->SetHeaderMargin(5);
        $this->SetFooterMargin(12);
        $this->setMargins(10, 40, 10);
        $this->AddPage();
        $this->writeHTML($this->content, true, false, true, false, '');

 

These lines.. I would like to have in every page: 150px height header and 150 px footer and products list in content.

 

Really I would like to do auto page break before footer. $this->SetAutoPageBreak(TRUE, 45); but it isnt work.

 

Thanks for any help..

Edited by cikcak (see edit history)
Link to comment
Share on other sites

These methods should help

 

setPageOrientation($orientation, $autopagebreak='', $bottommargin='')

SetMargins($left, $top, $right=-1, $keepmargins=false)

 

Thank you! Now I get and made correct invoice. But one more strange thing.

 

This is my footer code:

<table style="width: 100%;">
    <tr>
        <td style="width: 100%">
            <img src="http://myshop.com/img/invoicefooter.jpg"  />
        </td>
    </tr>
</table>

If one page invoice it works perfect. I can see image on the footer. But if invoice have 1-2-3 pages I can`t see correct image on 1 and 2 page. On last page - its correct. On other pages - it looks like RTL. Image - upside down and in the left corner I can see only 10% image.

 

This is example of invoice with 2 pages: first page footer ( http://prntscr.com/6nn5c9 ) and this is the last page footer - http://prntscr.com/6nn5lo

 

So it looks correct on the last page but why its different on first page?

 

Thanks for any information!

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...