Blutch_ Posted December 2, 2021 Share Posted December 2, 2021 Hello, I'm trying to add a table at the very end of a a4 paper. I modified the invoices tpls files with my custom html. So I modified in "classes/pdf/PDFGenerator.php" in function "writePage()" : public function writePage() { $this->SetHeaderMargin(5); $this->SetFooterMargin(0); $this->setMargins(10, 40, 10); $this->AddPage(); $this->writeHTML($this->content, true, false, true, false, ''); } I set FooterMargin to 0, but as you can see in the file Attached, there is still a margin(see red rectangle) that might be linked to TCPDF but I really don't know how to get rid of this margin ! I tried to remove the pagination in the same file "classes/pdf/PDFGenerator.php". My table has to be at the really end of the paper as it is then scanned and has to respect a specific format.... I can't find any related problems on google, or on this forum... Would appreciate if someone could help me a bit Have a nice day ! Link to comment Share on other sites More sharing options...
ComGrafPL Posted December 2, 2021 Share Posted December 2, 2021 Did you try to set margin to 1 instead of 0? Link to comment Share on other sites More sharing options...
Blutch_ Posted December 2, 2021 Author Share Posted December 2, 2021 5 minutes ago, ComGrafPL said: Did you try to set margin to 1 instead of 0? Yes I did, but no signifiant changes, there is still a "huge" margin Link to comment Share on other sites More sharing options...
Blutch_ Posted December 14, 2021 Author Share Posted December 14, 2021 Up ! I still doesn't know how to get rid of this "strange added" margin :(( Link to comment Share on other sites More sharing options...
Blutch_ Posted January 6, 2022 Author Share Posted January 6, 2022 Okay, my problem was linked to TCPDF, here is how I manage to get rid of this extra margin : I modified in "classes/pdf/PDFGenerator.php" the function "writePage()" : /** * Write a PDF page. */ public function writePage() { $this->SetHeaderMargin(5); $this->SetFooterMargin(0); $this->setMargins(10, 40, 10); $this->SetAutoPageBreak(TRUE, 0); $this->AddPage(); $this->writeHTML($this->content, true, false, true, false, ''); } Might be ugly but fix my problem. Solved 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