You must Sign In to post a response.
  • Category: ASP.NET

    Bottom border of last row in html table break across pdf pages


    Can you please suggest me how to avoid breaking of bottom border of last row in html when we create pdf.

    I have created dynamic table in c# and table row are more than 100 .
    So when i am creating pdf of this data, it is breaking in separate PDF pages.
    But bottom border of last row of table not appearing across PDF pages.

    Thanks and regards,
  • #767901

    May be you can change the style of the page.
    The below style will avoid the code from page breaks.

    table.print-friendly tr td, table.print-friendly tr th {
    page-break-inside: avoid;

    So once you add this style then add then refer this style in the table tag

    <table class="print-friendly">
    <!-- The rest of your table here -->


  • #767907
    Hai Pranjal,
    Looks like the problem is in the style where you are making the table logic. Check when the table is creating, how the border is generating. I think, you are inserting the values before creating the border.
    Hope it will be helpful to you.

    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)

  • Sign In to post your comments