require_once('tcpdf/tcpdf.php'); $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); $pdf->SetCreator(PDF_CREATOR); $pdf->SetTitle('My PDF Document'); $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, 'My PDF Document', 'Generated on ' . date('d.m.Y h:i:s')); $pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); $pdf->AddPage(); $pdf->SetFont('helvetica', '', 12); $pdf->Write(0, 'Hello World', '', 0, 'C', true, 0, false, false, 0); $pdf->Output('example_001.pdf', 'I');
require_once('tcpdf/tcpdf.php'); $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); $pdf->SetCreator(PDF_CREATOR); $pdf->SetTitle('My Advanced PDF Document'); $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, 'My Advanced PDF Document', 'Generated on ' . date('d.m.Y h:i:s')); $pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); $pdf->AddPage(); $tbl = '
Column 1 | Column 2 | Column 3 |
Data 11 | Data 12 | Data 13 |
Data 21 | Data 22 | Data 23 |
Data 31 | Data 32 | Data 33 |