Wkhtmltopdf and knp snappy, how to add border if the table is generated in two pages

I’m using symfony4, KnpSnappyBundle and Wkhtmltopdf. I’d like to generate pdf from dynamic table , it wokrks fine but because the border top and border bottom of td is 0 , this how I get the table in the end :

enter image description here

isn’t possible to add border for the last td in the first page and border for the first td in the second page ? what is the solution to add border if the table is generated in two pages?

this is my table , and css based on this response How to avoid page break inside table row for wkhtmltopdf:

     <style type="text/css">
    .table-base td {
        font-size: 13px;
        padding: 2px 5px 2px 2px;
        text-align: right;
        color: rgb(55, 56, 55);
        border-bottom: 0 !important;
        border-top: 0 !important;
    tr, td, th, tbody, thead, tfoot {
        page-break-inside: avoid !important;

<table cellpadding="0" cellspacing="0"
   style="width: 100%; border-collapse: collapse !important; border-spacing: 0 !important; border-bottom: none; margin-bottom: 15px"


Source: Symfony4 Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *