Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thead and tbody get mixed starting from second page #46

Open
gmartini20 opened this issue Jul 17, 2015 · 11 comments
Open

thead and tbody get mixed starting from second page #46

gmartini20 opened this issue Jul 17, 2015 · 11 comments

Comments

@gmartini20
Copy link

I'm creating a pdf from a html with thead and tbody tags, I have already removed all style I had and I'm still with the same problem.

Starting from second page the tbody overwrite thead, like on image bellow:

screen shot 2015-07-17 at 11 24 02

It is very strange because it works on the first page (image below) and I don't have any style on this page.

screen shot 2015-07-17 at 11 26 10

It seems to happened too with the guy who opened this issue: #36. But he didn't want to have table headers on all pages, I want to.

Do you ever experienced this problem? Is there a way to solve it?

@IonicaBizau
Copy link

Is there any known solution?

@agilbert314
Copy link

Having the same issue here.

@kodamirmo
Copy link

Any luck?

@IonicaBizau
Copy link

@kodamirmo In the latest release of nodeice, I switched to the phantom-html-to-pdf package by @pofider which doesn't have this bug. ✨

@morficus
Copy link

@IonicaBizau and @kodamirmo .... phantom-html-to-pdf has the same bug if you set the orientation the landscape :-(

pageSize: {
     orientation: 'landscape'
}

@marcbachmann
Copy link
Owner

That maybe works. #36 (comment)

@scurker
Copy link

scurker commented Jan 18, 2016

Sitting the proper css rules seemed to work for me:

thead {
  display: table-header-group;
}

tr {
  page-break-inside: avoid;
}

Headers repeated correctly without overlap. One trick is that you can't have any of those rules inside of a @print media rule, as it seems that it can't calculate the repeating headers correctly when doing so.

@mdelorimier
Copy link
Contributor

I seem to be unable to get this to work on my end. A working example of this would be greatly appreciated :)

@sonu27
Copy link

sonu27 commented Mar 8, 2017

I've been unable to get it to repeat headers, using v2.1 of this lib. Any update?

This might be related: ariya/phantomjs#13324 ariya/phantomjs#13524

@haschu
Copy link

haschu commented Jul 3, 2017

Same here. Did you find a workaround in the meantime @sonu27?

@rohitrelay
Copy link

Hi,

table thead section is not repeating after page break. I am using simple html.

header
data

Is anyone found solution?

Regards,
Rohit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests