I found the solution: I created a bash script who isolates the header in a HTML file then inject it with --header-html
Edit:
Assume that your header is in thead tag
filename="x.html"
begin=`awk '/<thead>/{ print NR; exit }' $filename`
end=`awk '/<\/thead>/{ print NR; exit }' $filename`
echo "<DOCTYPE! html>" > $filename".head.html"
cat $filename | head -$end | tail -n +$begin | sed -e "s/.*<thead>/<thead>/g" | sed -e "s/<\/thead>.*/<\/thead>/g" >> $filename".head.html"
#You can do the same for tfoot
wkhtmltopdf --header-html $filename".head.html" $filename output.pdf
it works also for tfoot or in the case of the header and the footer are in header tag .
you also need to make a style tag in the original document to say that display is none . ( you can add this by a script )