DomPDF does not render table nicely

前端 未结 2 2072
灰色年华
灰色年华 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: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; }
    

提交回复
热议问题