Hola Novata, yo no tengo ningun problema usando el tcpdf, lo uso para en un sistema de emision de fotocheck, y todo va bien, lo que si he notado que es disitinta la sintaxis que usas a la que tengo yo, mi version de TCPDF es la Version: 5.9.157, por ejemplo uso esto:
// create new PDF document
$tcpdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
//$fontname = $tcpdf->addTTFfont('tmp/ariblk.ttf', 'TrueTypeUnicode', '', 32);
$tcpdf->AddFont('arialnb','BI', 20,'','false');
$tcpdf->AddFont('ariblk','BI', 20,'','false');
// set document information
$tcpdf->SetCreator(PDF_CREATOR);
$tcpdf->SetAuthor('Aland Laines');
$tcpdf->SetTitle('Carnet Autoridad Pol�tica');
$tcpdf->SetSubject('TCPDF Tutorial');
$tcpdf->SetKeywords('fotocheck, DGGI, gobernador');
// set header and footer fonts
$tcpdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
// set default monospaced font
$tcpdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
//set margins
$tcpdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$tcpdf->SetHeaderMargin(0);
$tcpdf->SetFooterMargin(0);
// remove default footer
$tcpdf->setPrintFooter(false);
//set auto page breaks
$tcpdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
//set image scale factor
$tcpdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
//$tcpdf->setLanguageArray($l);
// ---------------------------------------------------------
// set font
$tcpdf->SetFont('times', '', 6);
// --- example with background set on page ---
// remove default header
$tcpdf->setPrintHeader(false);
// add a page
//$tcpdf->AddPage();
$tcpdf->AddPage('L', 'CARNET_DGGI');
// -- set new background ---
// get the current page break margin
$bMargin = $tcpdf->getBreakMargin();
// get current auto-page-break mode
$auto_page_break = $tcpdf->getAutoPageBreak();
// disable auto-page-break
$tcpdf->SetAutoPageBreak(false, 0);
// set background image
$img_file = '../files/base/tira.jpg';
$tcpdf->Image($img_file, 0, 0, 86, 54, '', '', '', false, 300, '', false, false, 0);
$tcpdf->SetFont('ariblk', '', 6);
$tcpdf->SetXY(35,13);
$html = '<span style="color:black;">R.D. N° '.$resolucion.'-'.$fnomb.'-1501</span>';
$tcpdf->writeHTML($html, true, false, true, false, '');
//$tcpdf->Write(0,'R.D. N� 9818-2011-1501');
$tcpdf->SetFont('arialnb', 'B', 6);
$tcpdf->SetXY(45,17);
//$tcpdf->Write(0,$tipo);
$html = '<span>'.$tipo.'</span>';
$tcpdf->writeHTML($html, true, false, true, false, '');
$tcpdf->SetXY(44,19.5);
$tcpdf->Write(0,$distrito);
$tcpdf->SetXY(44,22);
$tcpdf->Write(0,$provincia);
$tcpdf->SetXY(44,24.5);
$tcpdf->Write(0,$region);
//Foto
$tcpdf->Image('../../Publicacion/fotos/'.$dni.'.jpg', 5, 14.5, 22, 25.5, '', '', '', false, 72, '', false, false, array('LTRB' => array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))));
// Pie de Foto
$tcpdf->SetFont('arialn', 'B', 7);
$tcpdf->SetXY(1,42);
$tcpdf->Cell(30.5, 0, $apePat.' '.$apeMat, 0, 1, 'C', 0, '', 1);
$tcpdf->SetXY(1,44.5);
$tcpdf->Cell(30.5, 0, $nombreT, 0, 1, 'C', 0, '', 1);
$tcpdf->SetXY(1,47.5);
$tcpdf->Cell(30.5, 0, 'DNI '.$dni, 0, 1, 'C', 0, '', 1);
$tcpdf->SetFont('arialn', 'B', 7);
$tcpdf->SetXY(23,49);
$tcpdf->Cell(30.5, 0, 'No '.$numero, 0, 1, 'C', 0, '', 1);
// restore auto-page-break status
$tcpdf->SetAutoPageBreak($auto_page_break, $bMargin);
// set the starting point for the page content
$tcpdf->setPageMark();
//RETIRA DEL CARNET
$tcpdf->AddPage();
// get the current page break margin
$bMargin = $tcpdf->getBreakMargin();
// get current auto-page-break mode
$auto_page_break = $tcpdf->getAutoPageBreak();
// disable auto-page-break
$tcpdf->SetAutoPageBreak(false, 0);
$img_file = '../files/base/retira.jpg';
$tcpdf->Image($img_file, 0, 0, 86, 54, '', '', '', false, 300, '', false, false, 0);
//FIRMA
$tcpdf->Image('../../Publicacion/Firmas/'.$dni.'.jpg', 25, 9, 38, 22, '', '', '', false, 72, '', false, false, 0);
//CODIGO DE BARRAS
$style = array(
'position' => '',
'align' => 'C',
'stretch' => false,
'fitwidth' => false,
'cellfitalign' => '',
'border' => false,
'hpadding' => 'auto',
'vpadding' => 'auto',
'fgcolor' => array(0,0,0),
'bgcolor' => false, //array(255,255,255),
'text' => false,
'font' => 'helvetica',
'fontsize' => 12,
'stretchtext' => 0
);
$tcpdf->SetXY(45,3);
$tcpdf->write1DBarcode($dni, 'C128A', '', '', '39', 10, 0.9, $style, 'N');
$tcpdf->SetFont('arialn', 'B', 9);
$tcpdf->SetXY(26, 7.5);
$tcpdf->Cell(84, 0, $fexp, 0, 1, 'L', 0, '', 0);
//$tcpdf->Image('../../Publicacion/Firmas/'.$dni.'.jpg', 25, 9, 38, 22, '', '', '', false, 72, '', false, false, 0);
$tcpdf->SetFont('arialn', 'B', 6);
$tcpdf->SetXY(1,24);
$tcpdf->Cell(84, 0, $nombre.' '.$apePat.' '.$apeMat, 0, 1, 'C', 0, '', 0);
$tcpdf->SetFont('arialn', 'B', 5);
$tcpdf->SetXY(1,26.5);
$tcpdf->Cell(84, 0, $tipo.' '.$region.' - '.$provincia.' - '.$distrito, 0, 1, 'C', 0, '', 0);
// ---------------------------------------------------------
//Close and output PDF document
$tcpdf->Output('carnet-'.$dni.'.pdf', 'I');
Pero tambien la uso para generar reportes y me soporta HTML con tablas, las tablas van de esta manera:
$pdf->writeHTML($tbl, true, false, false, false, '');
donde lo que va en $tbl, es todo mi codigo html incluido mi css:
por ejemplo mi cabecera:
$pdf->SetFont('arialn', '', 8);
$tbl = '
<style>
th {
font-weight: bold;
margin-left: 0.5cm;
margin-right: 0.5cm;
background-color:#D0D0D0;
}
</style>
<table border="1">
<tr>
<th width="30" align="center"> Nro</th>
<th width="80"> PROVINCIA</th>
<th width="80"> DISTRITO</th>
<th width="160"> GOBERNADOR</th>
<th width="180"> DIRECCION ACTUAL</th>
<th width="40" align="center"> DNI</th>
<th width="60" align="center"> CELULAR</th>
<th width="60" align="center"> RPM</th>
<th width="60" align="center"> Telef. Fijo</th>
<th width="130" align="center"> EMAIL</th>
<th width="50" align="center"> Nro. Res.</th>
<th width="60" align="center"> F. Nombr.</th>
</tr>';
si tienes problemas usandolo como vendors, aqui hay un forma de usarlo creando un helper:
http://www.startutorial.com/articles/view/how-to-create-pdf-helper-with-tcpdf
en ese ejemplo las llamadas
$pdf->core->addPage('', 'USLETTER');
cambialas por:
$this->Pdf->core->addPage('', 'USLETTER');
Saludos!