cikcak Posted March 27, 2015 Share Posted March 27, 2015 (edited) 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 March 27, 2015 by cikcak (see edit history) Link to comment Share on other sites More sharing options...
tuk66 Posted March 27, 2015 Share Posted March 27, 2015 These methods should help setPageOrientation($orientation, $autopagebreak='', $bottommargin='') SetMargins($left, $top, $right=-1, $keepmargins=false) 1 Link to comment Share on other sites More sharing options...
cikcak Posted March 31, 2015 Author Share Posted March 31, 2015 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now