Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Repeat thead on each page via htmldoc

Tags:

html

pdf

htmldoc

I'm trying to figure out how to get a set of table headers to repeat on each page of output from htmldoc. I plugged in the CSS way (below) to see if that would work, but I don't believe htmldoc does much of anything with CSS.

The basic question is: Is there a way to make htmldoc act like this CSS when outputting to a PDF?

thead {display: table-header-group;}
like image 1000
Jack M. Avatar asked Aug 12 '10 16:08

Jack M.


1 Answers

HTMLDOC does not support HTML 4.0 elements, attributes, stylesheets, or scripting.

HTMLDOC is very limited. So you must do that by hand. Calculate when the page break on your table (and force it with ) and repeat the header table.
Or use an another tool for that . Have you tried xhtml2pdf : https://github.com/xhtml2pdf/xhtml2pdf . It supports css and have an repeat attribute that do this job for table when page break.

like image 193
yboussard Avatar answered Nov 09 '22 11:11

yboussard