PHP / TCPDF: Template Bug?
In case this is not solved for anyone else here and they are using FPDI to import a template, try looking at the calculated page height from FPDI and the resultant page height from TCPDF. For me they did not match, and to get rid of the black line I had to add 8 to the page height, and subtract 7 from the y-ordinate value in the useTemplate function in addition to setPrintHeader(false), like this:
$tplidx = $pdf->ImportPage($i);
$s = $pdf->getTemplateSize($tplidx);
// TCPDF STUFF, AddPage(), etc.
$pdf->useTemplate($tplidx,0,-7,$s['w'],$s['h']+8);
The horizontal line is defined on the default Header(). You can either override the Header() method as on example n. 3 or disable the header as on the example n. 2. Check the TCPDF website at http://www.tcpdf.org and consult the official forum for further information.
just do this $pdf->setPrintHeader(false);
and the line at the top will go away