socialcowboy Posted January 11, 2016 Share Posted January 11, 2016 I've been searching for hours but can't seem to find the right answer.. We have created our own pdf invoices, but encounter 1 problem.. PageBreaks. On large order the footer and content overlap - so the page break is too late. Can someone please provide me the right solution? Link to comment Share on other sites More sharing options...
tuk66 Posted January 12, 2016 Share Posted January 12, 2016 Try to play with margins in the /classes/pdf/PDFGenerator.php::writePage method. Link to comment Share on other sites More sharing options...
socialcowboy Posted January 12, 2016 Author Share Posted January 12, 2016 Thanks, I have already been doing that but can't seem to figure it out. public function writePage() { $this->SetHeaderMargin(20); $this->SetFooterMargin(40); $this->setMargins(10, 45, 10, ); $this->AddPage(); $this->writeHTML($this->content, true, false, true, false, ''); Increasing Footer margin just makes the footer come up.In the SetMargins i have no idea how to set the bottom margin.I tried (10,45,10,150) but the 4th one doesn't seem to show up anywhere. Link to comment Share on other sites More sharing options...
tuk66 Posted January 12, 2016 Share Posted January 12, 2016 Sorry, I'm perhaps wrong. This method looks: Defines the left, top and right margins. * @param $left (float) Left margin. * @param $top (float) Top margin. * @param $right (float) Right margin. Default value is the left one. * @param $keepmargins (boolean) if true overwrites the default page margins * @public * @since 1.0 * @see SetLeftMargin(), SetTopMargin(), SetRightMargin(), SetAutoPageBreak() */public function SetMargins($left, $top, $right=-1, $keepmargins=false) { ... Link to comment Share on other sites More sharing options...
socialcowboy Posted January 12, 2016 Author Share Posted January 12, 2016 So.. not the bottom margins. Let - Top - Right seems to be right - but it doesn't solve the problem. Link to comment Share on other sites More sharing options...
laurent75014 Posted April 3, 2019 Share Posted April 3, 2019 Hi, Have you solved the problem? Can you share it? Thanks 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