Rhobur Posted October 17, 2016 Share Posted October 17, 2016 Hi, Tried to do that by disabling or returning null everything related to the header in the tpl files and the htmltemplateinvoice class, the pdfgenerator class but no luck. Even when displaying nothing the invoice is keeping the blank header row and the summary tab is starting under that. Except from fumbling with the tcpdf class I have no other idea. Maybe someone did that already? Link to comment Share on other sites More sharing options...
rocky Posted October 18, 2016 Share Posted October 18, 2016 Have you tried overriding the render function in classes/pdf/Pdf.php and removing the following line? $this->pdf_renderer->createHeader($template->getHeader()); Link to comment Share on other sites More sharing options...
Rhobur Posted October 18, 2016 Author Share Posted October 18, 2016 Yes, I did. It removes the header content but it leaves the blank margin to the top appearing as an invisibile header. I have tried modifying the layout in the htmltemplateinvoice, still the same. Removing the header content is possible by a lot of ways but removing the blank top margin/space isn't :-( Link to comment Share on other sites More sharing options...
rocky Posted October 18, 2016 Share Posted October 18, 2016 Another line you can try removing on line 215 of classes/pdf/PDFGenerator.php: $this->SetHeaderMargin(5); Link to comment Share on other sites More sharing options...
Rhobur Posted October 19, 2016 Author Share Posted October 19, 2016 tried that too before, I am afraid. No luck. In the end I gave up and kept the header with the logo only. :-( Thanks for trying to help! Link to comment Share on other sites More sharing options...
Tomás Crespo Posted March 27 Share Posted March 27 (edited) The key is the second parameter (40) of the function setMargins() in writePage() in PDFGenerator.php 40 is the top-margin of the main content (body). This is the space ocuped by the header. Reduce it to 0 to remove the header public function writePage() { ... $this->setMargins(10, 40, 10); In versions <1.8 this parameter was 20. In versions >=1.8 this parameter is 40 Edited March 27 by Tomás Crespo (see edit history) 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