Menu

SplittingBig html table

Help
Mauro Cala
2016-01-20
2016-01-20
  • Mauro Cala

    Mauro Cala - 2016-01-20

    Hi to everybody!

    I've a big html table that I want to render in a pdf.
    If I "write" all the table at once, there are no errors, but the pdf is empty.

    So, I've tried to split the single big table in N-little tables (with 30 lines each), but a small gap between them appeared.

    How can I eliminate it?

    Thank you for the help!

     
  • Simon

    Simon - 2016-01-20

    Are error messages turned on in PHP?
    Can you validate your HTML table? Eg. is it missing a tag somewhere?

     
  • Mauro Cala

    Mauro Cala - 2016-01-20

    Thank you Simon for your reply!

    no errors are thrown in php, and if I echo the html of the table is correct.

    I cannot understand another point: when I look at html of the big original table, it is there, perfectly drawn. When I save the pdf, instead, it is a blank page...

    last lines of the creation of the pdf are:

    ...
    $tbl .= "</table>";
    
    echo ($tbl);
    
    $pdf->writeHTML($tbl, true, false, false, false, '');
    
    $pdf->Close ();
    ...
    
     
  • Simon

    Simon - 2016-01-20

    A browser is more forgiving to bad html than TCPDF.
    Try the HTML here: https://validator.w3.org/#validate_by_input

     
  • Mauro Cala

    Mauro Cala - 2016-01-20

    I will try the validator, but I think that not the problem... on a subset of lines (without the division in little tables) the pdf is correctly saved and shown...

     

Log in to post a comment.