cakebake / markdown-themeable-pdf

ARCHIVED. NOT MAINTAINED. Themeable Markdown Converter (Print to PDF, HTML, JPEG or PNG)
https://atom.io/packages/markdown-themeable-pdf
133 stars 37 forks source link

table header collision #24

Closed diggit closed 8 years ago

diggit commented 8 years ago

Tables over multiple pages in PDF export mode has colliding header with first row after page-break inside table. page-break

cakebake commented 8 years ago

Could you please attach the markdown text to reproduce? You can replace sensible information with nonsense text. I know of this behaviour, let's see if I could fix it with your markdown. I have fixed it with my demos.

diggit commented 8 years ago

My markdown was nothing special. It looks different now, but here is example that produces this problem too. (Modified style, header and footer included too)

example.zip

cakebake commented 8 years ago

I think this happens because of an error in phantomjs (headless browser with pdf print support).

In future, I will look for another renderer, because I'm generally not completely satisfied. Atom (electron) has build in pdf printing (like chrome), but breaks tables -.-

Anyway, this is a Major Issue at which I work. I leave the issue open, but can not help you up to date. :/

diggit commented 8 years ago

Yeah, you are right! https://github.com/ariya/phantomjs/issues/10927

Workaround mentioned in that bugreport: thead, tfoot {display: table-row-group;} makes only one thead but page-break looks bad too. page-break_2 Table is separated, but on wrong place.

I'll stay tuned, your package pretty good!

cakebake commented 8 years ago

Thank´s!

Since 2012 not solved :(

I'd like to switch to another headless browser, but I would like for all operating systems have a base. With hyperlinks it's the same.

walter-psjr commented 8 years ago

I had the same problem and solved by replacing the blanks by   the table thead. For example:

<table>
    <thead>
        <tr>
             <th>It&nbsp;is&nbsp;an&nbsp;example<th>
        </tr>
    </thead>
    ...
</table>
cakebake commented 8 years ago

This issue is obsolete. Since last versions of phantomjs the header is not repeated over pages anymore. Unfortunately -.- ariya/phantomjs#13193 ariya/phantomjs#12422 ariya/phantomjs#10615