1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <?php
- require_once('tcpdf_include.php');
- $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, false, 'ISO-8859-1', false);
- $pdf->setDocInfoUnicode(true);
- $pdf->setCreator(PDF_CREATOR);
- $pdf->setAuthor('Nicola Asuni [€]');
- $pdf->setTitle('TCPDF Example 019');
- $pdf->setSubject('TCPDF Tutorial');
- $pdf->setKeywords('TCPDF, PDF, example, test, guide');
- $pdf->setHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 019', PDF_HEADER_STRING);
- $pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
- $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
- $pdf->setDefaultMonospacedFont(PDF_FONT_MONOSPACED);
- $pdf->setMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
- $pdf->setHeaderMargin(PDF_MARGIN_HEADER);
- $pdf->setFooterMargin(PDF_MARGIN_FOOTER);
- $pdf->setAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
- $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
- $lg = Array();
- $lg['a_meta_charset'] = 'ISO-8859-1';
- $lg['a_meta_dir'] = 'ltr';
- $lg['a_meta_language'] = 'en';
- $lg['w_page'] = 'page';
- $pdf->setLanguageArray($lg);
- $pdf->setFont('helvetica', '', 12);
- $pdf->AddPage();
- $pdf->setFillColor(200, 255, 200);
- $txt = 'An alternative configuration file is used on this example.
- Check the definition of the K_TCPDF_EXTERNAL_CONFIG constant on the source code.';
- $pdf->MultiCell(0, 0, $txt."\n", 1, 'J', 1, 1, '', '', true, 0, false, true, 0);
- $pdf->Output('example_019.pdf', 'I');
|