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

Table cell organization bug #196

Closed
ubidval opened this issue Oct 25, 2023 · 3 comments
Closed

Table cell organization bug #196

ubidval opened this issue Oct 25, 2023 · 3 comments

Comments

@ubidval
Copy link

ubidval commented Oct 25, 2023

I have an issue with the table cell organization when we have 2 columns that have with child columns. The children of the second column are not rendered correctly during the PDF generation with pdfmake.

The HTML code used :

<table style="width: 100%;" data-pdfmake='{ "dontBreakRows": true }'>
            <th colspan="3" rowspan="2">Numéro d'ordre</th>
            <th colspan="13" rowspan="1">Titulaire</th>
            <th colspan="4" rowspan="2">Nombre de titres</th>
            <th colspan="13" rowspan="1">Bénéficiaire</th>
        </tr>

        <tr style="font-weight: bold; text-align: center;">
            <th colspan="10" rowspan="1">Nom et prénom / Dénomination sociale</th>
            <th colspan="3" rowspan="1">N° de compte</th>

            <th colspan="10" rowspan="1">Nom et prénom / Dénomination sociale</th>
            <th colspan="3" rowspan="1">N° de compte</th>
        </tr>
</table>

The generated PDF :
image

@Aymkdn
Copy link
Owner

Aymkdn commented Oct 25, 2023

I need to investigate. I'll get back to you.

@Aymkdn
Copy link
Owner

Aymkdn commented Oct 25, 2023

I've just released v2.5.0 with a new way to deal with colspan and rowspan.

Also, make sure to use headerRows in data-pdfmake to have a better rendering:

<table style="width: 100%;" data-pdfmake='{ "dontBreakRows":true, "headerRows":2 }'>

image

@Aymkdn Aymkdn closed this as completed Oct 25, 2023
@ubidval
Copy link
Author

ubidval commented Oct 26, 2023

Thanks !

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

2 participants