KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Don't split table when rendering to PDF option #1747

Closed Patrick Vermont opened this topic on on Dec 3, 2020 - 2 comments

Patrick Vermont commented on Dec 3, 2020

Hello,

Is there any way to force a table to the next page if it doesn't fit on the current page (PDF Export)?

Or a way to calculate how much room is left on a page and the height of the generated table to be able to add a page break on a callback?

Or any other creative way to solve this?

Thanks,

Pat

Sebastian Morales commented on Dec 4, 2020

Patrick, pls try to add the following CSS rule to your pdf view page:

    table, tr, td, th, tbody, thead, tfoot {
        page-break-inside: avoid !important;
    }
    @media print {
        table, tr, td, th, tbody, thead, tfoot {
            page-break-inside: avoid !important;
        }
    }

It wouldn't be always successful because a too long table wouldn't fit any certain page size.

Patrick Vermont commented on Dec 4, 2020

Seems to work for small tables! Thank you! I'm very happy with Koolreport and your service!

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
None yet

Export