Primero lo que hice fue colocar en una ruta distinta el archivo para generar el PDF y hacia eso que describí arriaba, luego lo que hice fue colocar en la misma ruta que el ejemplo06 y sigue haciendo lo mismo (en ambos caso las ruta de los includes estaba bien).
Este es el código del ejemplo:
http://www.tecnick.com/pagefiles/tcpdf/example_006.phps
Este es el código que modifique yo(solo quite partes del original):
Código PHP:
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor("Nicola Asuni");
$pdf->SetTitle("TCPDF Example 006");
$pdf->SetSubject("TCPDF Tutorial");
$pdf->SetKeywords("TCPDF, PDF, example, test, guide");
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
//set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
//set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
//set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
$pdf->setLanguageArray($l);
//initialize document
$pdf->AliasNbPages();
// add a page
$pdf->AddPage();
// ---------------------------------------------------------
// set font
$pdf->SetFont("freeserif", "", 11);
// create some HTML content
$htmlcontent = "<h1>HTML Example</h1>< € € € & è è © > \\slash \\\\double-slash \\\\\\triple-slash<h2>List</h2>List example:<ol><li><b>bold text</b></li><li><i>italic text</i></li><li><u>underlined text</u></li><li><a href=\"http://www.tecnick.com\" dir=\"ltr\">link to http://www.tecnick.com</a></li><li>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.<br />Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.</li><li>SUBLIST<ol><li>row one<ul><li>sublist</li></ul></li><li>row two</li></ol></li><li><b>T</b>E<i>S</i><u>T</u> <del>line through</del></li><li><font size=\"+3\">font + 3</font></li><li><small>small text</small> normal <small>small text</small> normal <sub>subscript</sub> normal <sup>superscript</sup> normal</li></ol><dl><dt>Coffee</dt><dd>Black hot drink</dd><dt>Milk</dt><dd>White cold drink</dd></dl><div style=\"text-align:center\">IMAGES<br /><img src=\"../images/logo_example.png\" alt=\"test alt attribute\" width=\"100\" height=\"100\" border=\"0\" align=\"top\" /><img src=\"../images/logo_example.gif\" alt=\"test alt attribute\" width=\"100\" height=\"100\" border=\"0\" align=\"top\" /><img src=\"../images/logo_example.jpg\" alt=\"test alt attribute\" width=\"100\" height=\"100\" border=\"0\" /></div>";
// output the HTML content
$pdf->writeHTML($htmlcontent, true, 0, true, 0);
// reset pointer to the last page
$pdf->lastPage();
//Close and output PDF document
$pdf->Output("example_006.pdf", "I", "I");
Código:
La verdad que no entiendo que pasa, ¿alguna idea? Gracias <h1>HTML Example</h1>< � € € & �è © > \slash \\double-slash \\\triple-slash<h2>List</h2>List example:<ol><li><b>bold text</b></li><li><i>italic text</i></li><li><u>underlined text</u></li><li><a href="http://www.tecnick.com" dir="ltr">link to http://www.tecnick.com</a></li><li>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.<br />Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.</li><li>SUBLIST<ol><li>row one<ul><li>sublist</li></ul></li><li>row two</li></ol></li><li><b>T</b>E<i>S</i><u>T</u> <del>line through</del></li><li><font size="+3">font + 3</font></li><li><small>small text</small> normal <small>small text</small> normal <sub>subscript</sub> normal <sup>superscript</sup> normal</li></ol><dl><dt>Coffee</dt><dd>Black hot drink</dd><dt>Milk</dt><dd>White cold drink</dd></dl><div style="text-align:center">IMAGES<br /><img src="../images/logo_example.png" alt="test alt attribute" width="100" height="100" border="0" align="top" /><img src="../images/logo_example.gif" alt="test alt attribute" width="100" height="100" border="0" align="top" /><img src="../images/logo_example.jpg" alt="test alt attribute" width="100" height="100" border="0" /></div>