1

I'm new to html2pdf and tried some things with page_header and page_footer. But I was looking for something like a document header what is only called once when creating a pdf. I need to create a document with a page header and above the page header on the first page there need to be some information. On the 2nd page there only need to be the page header.

Is this possible?

2

i've just created it by duplicating the page_header function and called it document_header but now i need to move the page_header down
function o_DOCUMENT_HEADER($param)
{
	$this->subHEADER = array();

	for($this->parse_pos; $this->parse_pos<count($this->parsing->code); $this->parse_pos++)
	{
		$todo = $this->parsing->code[$this->parse_pos];
		if ($todo['name']=='document_header') $todo['name']='page_header_sub';
		$this->subHEADER[] = $todo;
		if (strtolower($todo['name'])=='page_header_sub' && $todo['close']) break;
	}

	$this->SetPageHeader();
}

3

Joram (./1) :
I'm new to html2pdf and tried some things with page_header and page_footer. But I was looking for something like a document header what is only called once when creating a pdf. I need to create a document with a page header and above the page header on the first page there need to be some information. On the 2nd page there only need to be the page header.
Is this possible?


you can't separate the first pages of the others ? like this :
<page ...>
  <page_header>
    header of page 1
  </page_header>
  page 1
</page>
<page ...>
  <page_header>
    header of others pages
  </page_header>
  others pages
</page>
Ancien pseudo : lolo

4

nice, thats great!

5

wait, that is not the prpper solution for my problem... i'l explaine the whole idea:
i have a pdf with on the first page some information on the top and after that a long table starts(but it could be that it is within one page). On every new page the table header needs to be on the top of the page so the readers know what coloms there are.

My solution for the table header was to make this as a seperate table in the page_header so it would be above all pages, but then i can't put the information above. When i declare more pages(as you said) i can't create the long table.

6

why do you want to use page_header in this case ? why don't you just write the informations before the table ?
Ancien pseudo : lolo

7

how else would the table header on every page? when i have a table that is 3 pages long i can set the information manualy above the table but i need something that puts the information at the top of page 2 and 3

8

have you try to use the thead tag ? wink see the examples
Ancien pseudo : lolo

9

thx, i'm going to have a better view at the exambles... :P