KoolReport's Forum

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

Datables styles pdf export #2374

Open Epitello opened this topic on on Oct 6, 2021 - 7 comments

Epitello commented on Oct 6, 2021

Hi,

I customized css for datatables columns and rows with the "attributes" option.

The datatable's display works fine. I get this result :

When I export in pdf, the style doesn't applied and I get this result:

I customize css datatable like this

I have same problem with PivotTable.

Thanks for help

Sebastian Morales commented on Oct 7, 2021

I think this is because background color css is disabled by default when printing (to save ink in case users don't notice). You could turn it on by adding the following css rule to your PDF view file:

<style>
        * {
            -webkit-print-color-adjust: exact !important;
        } 

    @media print {

        * {
            -webkit-print-color-adjust: exact !important;
        } 
    }
</style>

Let us know how it works for you. Tks,

Epitello commented on Oct 7, 2021

I applied this css rules but it doesn't work.

Thanks

Sebastian Morales commented on Oct 7, 2021

Are you using Export or CloudExport package?

Epitello commented on Oct 7, 2021

I'm using export but I fixed problem using "!important" css rule.

Thanks for help

Epitello commented on Oct 7, 2021

Please, I have an another problem with pdf export. I have two PivotTables on two separated pages. The first is well rendered but not the second. Borders are missing. The two pages are separated with "page-break" div.

The first:

And the second:

Thanks

Sebastian Morales commented on Oct 8, 2021

Does this happen with the web view or only in pdf export?

Epitello commented on Oct 8, 2021

Pdf and excel export

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
solved

None