Jump to content

Totally removing header from invoice pdf?


Recommended Posts

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

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

  • 7 years later...

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 by Tomás Crespo (see edit history)
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...