$pdf = new TCPDF(); $pdf->AddPage(); $pdf->Line(0, 10, $pdf->getPageWidth(), 10, array('width' => 0.5, 'color' => array(0, 0, 0))); $pdf->Output();
$pdf = new TCPDF(); $pdf->AddPage(); $pdf->Line($pdf->getPageWidth() / 2, 0, $pdf->getPageWidth() / 2, $pdf->getPageHeight(), array('width' => 0.5, 'color' => array(255, 0, 0))); $pdf->Output();
$pdf = new TCPDF(); $pdf->AddPage(); $pdf->Line(0, 0, $pdf->getPageWidth(), $pdf->getPageHeight(), array('width' => 0.5, 'color' => array(0, 255, 0))); $pdf->Output();The TCPDF Line class is part of the TCPDF library.