I've been trying for a while now to create a pdf of a bootstrap page with mpdf and not lose table and other styling. From what I've read on mpdf site is that the styles I'm referring to are supported, so not sure what the problem is. Other styling is being applied. Just not these table classes.
Tables have these classes: " table table-striped table-responsive small "
Bootstrap 3.3.1 and mPDF 5.7 & 6
The page displays as intended in browsers, but the pdf is stripped of table styling, and it's causing readability issues.
I've tried removing the @print from bootstrap.min.css as mentioned here: https://stackoverflow.com/a/27299382/1181367 but makes no difference.
Thanks in advance for any input you offer.
For striping the table you can use the following css.
<style>
tr:nth-child(even) {
background-color: #f2f2f2;
}
</style>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With