setCreator(PDF_CREATOR); $pdf->setAuthor('Nicola Asuni'); $pdf->setTitle('TCPDF Example 005'); $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.' 005', 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 default monospaced font // $pdf->setDefaultMonospacedFont(PDF_FONT_MONOSPACED); // 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 (optional) //if (@file_exists(dirname(__FILE__).'/lang/eng.php')) { // require_once(dirname(__FILE__).'/lang/eng.php'); // $pdf->setLanguageArray($l); //} // --------------------------------------------------------- $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); // set font $pdf->setFont('times', '', 10); // add a page $pdf->AddPage(); // set cell padding //$pdf->setCellPaddings(1, 1, 1, 1); // set cell margins //$pdf->setCellMargins(1, 1, 1, 1); // set color for background //$pdf->setFillColor(127, 255, 127); $html = '
This is just an example of html code to demonstrate some supported CSS inline styles. bold text line-trough underline and line-trough color background color bold xx-small x-small small medium large x-large xx-large
'; $pdf->writeHTML($html, true, false, true, false, ''); // MultiCell($w, $h, $txt, $border=0, $align='J', $fill=0, $ln=1, $x='', $y='', $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0) // set some text for example $txt = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.'; // Multicell test // move pointer to last page $pdf->lastPage(); // --------------------------------------------------------- //Close and output PDF document $pdf->Output('/home/cespinosa/example_005.pdf', 'I'); //============================================================+ // END OF FILE //============================================================+