DomPDF does not render table nicely

前端 未结 2 2087
灰色年华
灰色年华 2021-02-19 09:57

I am trying to get PDF using DomPDF but I come cross a strange problem. All the data and other things are fine but when it renders in PDF the first line of the table is always o

相关标签:
2条回答
  • 2021-02-19 10:08

    I use

    thead:before, thead:after { display: none; }
    tbody:before, tbody:after { display: none; }
    
    0 讨论(0)
  • 2021-02-19 10:10

    Almost certainly the issue is your use of Bootstrap. A lot of dompdf issues related to Bootstrap have to do with the :before/:after declarations. I think you can work around the problem in this particular case by applying the following CSS for dompdf:

    tbody:before, tbody:after { display: none; }
    
    0 讨论(0)
提交回复
热议问题