Pdfmake: Tables cut off rather than breaking for the next page

Created on 6 Oct 2016  路  5Comments  路  Source: bpampuch/pdfmake

I have tables with dynamic content, and sometimes rather than breaking in the appropriate place and continuing on the next page they just run off the end of the page, losing the rest of the content. Previously with this issue I was able to "fix" it by putting 'pageBreak: before' on the table, starting it on a new page after which it would break in the appropriate place, but that messes with the flow of the document and is no longer working reliably to fix the issue. Has anyone had this experience, and if so had any success?

table

Most helpful comment

Solution - table cells must contain at least 1 space, not empty string.
When cell with empty string, then correct height cannot be calculated and in this case pageBreak is not inserted.

Explained earlier - https://github.com/bpampuch/pdfmake/issues/618

All 5 comments

Hi @gerickson808, you could solve the problem?

No. My solution of pageBreak:before before the first dynamic table does reliably fix it now that I'm also explicitly setting page size, however this is not ideal as it leaves the page before the tables mostly blank.

@gerickson808 did you try dontBreakRows: true, in your table configuration? Are you expecting it to break on individual rows or on the table as a whole?

Can be used unbreakable attribute, see PR https://github.com/bpampuch/pdfmake/pull/1073

Solution - table cells must contain at least 1 space, not empty string.
When cell with empty string, then correct height cannot be calculated and in this case pageBreak is not inserted.

Explained earlier - https://github.com/bpampuch/pdfmake/issues/618

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jokris1 picture jokris1  路  3Comments

einfallstoll picture einfallstoll  路  3Comments

CharlyPoppins picture CharlyPoppins  路  3Comments

imoum007 picture imoum007  路  3Comments

kumarandena picture kumarandena  路  3Comments