Search code examples
phptcpdf

tcpdf generation getting horizontal line


I am generating a pdf file with some data. I am getting a horizontal line in the generated pdf. why i am getting this i can't found. can anybody help me where i am wrong. here is my code. some code goes in the for loop.

    <?php
        $start=180001;
        $stop=180005;
        require_once('../tcpdf/tcpdf.php');
        require_once('../tcpdf/fonts/times.php');

        $file = new TCPDF();

        $file->SetTitle ( 'Blank OMR generation' );

        $file->SetFont ( 'times', '', 20 );

        for($i=$start;$i<=$stop;$i++)
        {

        }
         $file->Output( 'blank_omr.pdf', 'I' );

        ?>

you can find the horizontal line in the image


Solution

  • Try disabling the headers, as in the documentation example https://tcpdf.org/examples/example_002/:

    $file->setPrintHeader(false);