I converted html to PDF file which contains 400-500 pages using wkhtmltopdf. But getting undesirable spaces after each 4 rows in table. How to overcome this issue ? HTML is looks fine but PDF has spaces.
I use following things to create PDF.
@media all { table { empty-cells: hide !important;} tr { page-break:avoid; page-break-inside: avoid; empty-cells:hide; margin:0px; padding:0px;} .pgBrk { page-break-after: always !important; page-break-inside:avoid !important;} tr.json-array-table { page-break-inside: avoid !important;}
Please suggest.
I have done this using TCPDF library. wkhtmltopdf is fast execution but less customization. TCPDF supports customization and a lot of key features when you work with the creation of PDF files. We can checkout BEST library in php here .