~critecia/critecia/trunk

« back to all changes in this revision

Viewing changes to src/app/vendors/tcpdf/examples/example_002.php

  • Committer: Christian A. Reiter
  • Date: 2011-11-16 20:08:35 UTC
  • Revision ID: christian.a.reiter@gmail.com-20111116200835-h3xx0ekm47lububw
fixed jQuery file links

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
//============================================================+
3
 
// File name   : example_002.php
4
 
// Begin       : 2008-03-04
5
 
// Last Update : 2010-08-08
6
 
//
7
 
// Description : Example 002 for TCPDF class
8
 
//               Removing Header and Footer
9
 
//
10
 
// Author: Nicola Asuni
11
 
//
12
 
// (c) Copyright:
13
 
//               Nicola Asuni
14
 
//               Tecnick.com s.r.l.
15
 
//               Via Della Pace, 11
16
 
//               09044 Quartucciu (CA)
17
 
//               ITALY
18
 
//               www.tecnick.com
19
 
//               info@tecnick.com
20
 
//============================================================+
21
 
 
22
 
/**
23
 
 * Creates an example PDF TEST document using TCPDF
24
 
 * @package com.tecnick.tcpdf
25
 
 * @abstract TCPDF - Example: Removing Header and Footer
26
 
 * @author Nicola Asuni
27
 
 * @since 2008-03-04
28
 
 */
29
 
 
30
 
require_once('../config/lang/eng.php');
31
 
require_once('../tcpdf.php');
32
 
 
33
 
// create new PDF document
34
 
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
35
 
 
36
 
// set document information
37
 
$pdf->SetCreator(PDF_CREATOR);
38
 
$pdf->SetAuthor('Nicola Asuni');
39
 
$pdf->SetTitle('TCPDF Example 002');
40
 
$pdf->SetSubject('TCPDF Tutorial');
41
 
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
42
 
 
43
 
// remove default header/footer
44
 
$pdf->setPrintHeader(false);
45
 
$pdf->setPrintFooter(false);
46
 
 
47
 
// set default monospaced font
48
 
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
49
 
 
50
 
//set margins
51
 
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
52
 
 
53
 
//set auto page breaks
54
 
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
55
 
 
56
 
//set image scale factor
57
 
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
58
 
 
59
 
//set some language-dependent strings
60
 
$pdf->setLanguageArray($l);
61
 
 
62
 
// ---------------------------------------------------------
63
 
 
64
 
// set font
65
 
$pdf->SetFont('times', 'BI', 20);
66
 
 
67
 
// add a page
68
 
$pdf->AddPage();
69
 
 
70
 
// set some text to print
71
 
$txt = <<<EOD
72
 
TCPDF Example 002
73
 
 
74
 
Default page header and footer are disabled using setPrintHeader() and setPrintFooter() methods.
75
 
EOD;
76
 
 
77
 
// print a block of text using Write()
78
 
$pdf->Write($h=0, $txt, $link='', $fill=0, $align='C', $ln=true, $stretch=0, $firstline=false, $firstblock=false, $maxh=0);
79
 
 
80
 
// ---------------------------------------------------------
81
 
 
82
 
//Close and output PDF document
83
 
$pdf->Output('example_002.pdf', 'I');
84
 
 
85
 
//============================================================+
86
 
// END OF FILE                                                
87
 
//============================================================+