2
//============================================================+
3
// File name : example_002.php
5
// Last Update : 2010-08-08
7
// Description : Example 002 for TCPDF class
8
// Removing Header and Footer
10
// Author: Nicola Asuni
16
// 09044 Quartucciu (CA)
20
//============================================================+
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
30
require_once('../config/lang/eng.php');
31
require_once('../tcpdf.php');
33
// create new PDF document
34
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
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');
43
// remove default header/footer
44
$pdf->setPrintHeader(false);
45
$pdf->setPrintFooter(false);
47
// set default monospaced font
48
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
51
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
53
//set auto page breaks
54
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
56
//set image scale factor
57
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
59
//set some language-dependent strings
60
$pdf->setLanguageArray($l);
62
// ---------------------------------------------------------
65
$pdf->SetFont('times', 'BI', 20);
70
// set some text to print
74
Default page header and footer are disabled using setPrintHeader() and setPrintFooter() methods.
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);
80
// ---------------------------------------------------------
82
//Close and output PDF document
83
$pdf->Output('example_002.pdf', 'I');
85
//============================================================+
87
//============================================================+