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' );
?>
My Answer:
It is difficult to determine the exact cause of the horizontal line without seeing the code inside the for loop. However, horizontal lines are often added in TCPDF by using the `Line()` method.
If you are not intentionally adding a horizontal line in your code, it is possible that there is a mistake in the loop that is inadvertently adding the line.
Here are a few things you can check:
1. Look for any calls to the `Line()` method in your code and make sure they are not accidentally adding a horizontal line.
2. Check the loop logic to ensure that it is not inadvertently adding a line.
3. Make sure that there are no extra spaces or characters being output in the loop that could be interpreted as a line.
If you are still unable to identify the issue, please provide more details or the code inside the loop for further assistance.
Rate this post
4 of 5 based on 2033 votesComments