[ Index ] |
PHP Cross Reference of vtigercrm-6.1.0 |
[Summary view] [Print] [Text view]
1 <?php 2 //============================================================+ 3 // File name : test_old.php 4 // Begin : 2004-07-14 5 // Last Update : 2006-10-28 6 // 7 // Description : Test page fot TCPDF class 8 // 9 // Author: Nicola Asuni 10 // 11 // (c) Copyright: 12 // Tecnick.com S.r.l. 13 // Via Ugo Foscolo n.19 14 // 09045 Quartu Sant'Elena (CA) 15 // ITALY 16 // www.tecnick.com 17 // [email protected] 18 //============================================================+ 19 20 // NOTE: change the FPDF_FONTPATH constant on config/tcpdf_config.php file to K_PATH_MAIN."fonts/old" 21 // to use the Type1 fonts. 22 23 /** 24 * Create PDF document - test for byte charset 25 * @package com.tecnick.tcpdf 26 * @abstract TCPDF - unicode test. 27 * @author Nicola Asuni 28 * @copyright 2004 Tecnick.com S.r.l (www.tecnick.com) Via Ugo Foscolo n.19 - 09045 Quartu Sant'Elena (CA) - ITALY - www.tecnick.com - [email protected] 29 * @link http://tcpdf.sourceforge.net 30 * @license http://www.gnu.org/copyleft/lesser.html LGPL 31 * @since 2004-07-14 32 */ 33 34 $doc_title = "test title"; 35 $doc_subject = "test description"; 36 $doc_keywords = "test keywords"; 37 $htmlcontent = "<h1>heading 1</h1><h2>heading 2</h2><h3>heading 3</h3><h4>heading 4</h4><h5>heading 5</h5><h6>heading 6</h6>ordered list:<br /><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\">link to http://www.tecnick.com</a></li><li>test break<br />second line<br />third line</li><li><font size=\"+3\">font + 3</font></li><li><small>small text</small></li><li>normal <sub>subscript</sub> <sup>superscript</sup></li></ul><hr />table:<br /><table border=\"1\" cellspacing=\"1\" cellpadding=\"1\"><tr><th>#</th><th>A</th><th>B</th></tr><tr><th>1</th><td>A1</td><td>B1</td></tr><tr><th>2</th><td>A2</td><td>B2</td></tr><tr><th>3</th><td>A3</td><td>B3</td></tr></table><hr />image:<br /><img src=\"images/logo_example.png\" alt=\"\" width=\"100\" height=\"100\" border=\"0\" />"; 38 39 require_once ('config/lang/eng.php'); 40 require_once ('tcpdf.php'); 41 42 //create new PDF document (document units are set by default to millimeters) 43 $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, false); 44 45 // set document information 46 $pdf->SetCreator(PDF_CREATOR); 47 $pdf->SetAuthor(PDF_AUTHOR); 48 $pdf->SetTitle($doc_title); 49 $pdf->SetSubject($doc_subject); 50 $pdf->SetKeywords($doc_keywords); 51 52 $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING); 53 54 //set margins 55 $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); 56 //set auto page breaks 57 $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); 58 $pdf->SetHeaderMargin(PDF_MARGIN_HEADER); 59 $pdf->SetFooterMargin(PDF_MARGIN_FOOTER); 60 $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); //set image scale factor 61 62 $pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); 63 $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); 64 65 $pdf->setLanguageArray($l); //set language items 66 67 //initialize document 68 $pdf->AliasNbPages(); 69 70 $pdf->AddPage(); 71 72 // set barcode 73 $pdf->SetBarcode(date("Y-m-d H:i:s", time())); 74 75 // output some HTML code 76 $pdf->writeHTML($htmlcontent, true); 77 78 // output some content 79 $pdf->SetFont("helvetica", "BI", 20); 80 $pdf->Cell(0,10,'TEST Bold-Italic Cell',1,0,'C'); 81 82 //Close and output PDF document 83 $pdf->Output(); 84 85 //============================================================+ 86 // END OF FILE 87 //============================================================+ 88 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:08:37 2014 | Cross-referenced by PHPXref 0.7.1 |