28 require_once(
'tcpdf_include.php');
38 $this->
Image($image_file, 10, 10, 15,
'',
'JPG',
'',
'T',
false, 300,
'',
false,
false, 0,
false,
false,
false);
40 $this->
SetFont(
'helvetica',
'B', 20);
42 $this->
Cell(0, 15,
'<< TCPDF Example 003 >>', 0,
false,
'C', 0,
'', 0,
false,
'M',
'M');
50 $this->
SetFont(
'helvetica',
'I', 8);
52 $this->
Cell(0, 10,
'Page '.$this->
getAliasNumPage().
'/'.$this->
getAliasNbPages(), 0,
false,
'C', 0,
'', 0,
false,
'T',
'M');
61 $pdf->SetAuthor(
'Nicola Asuni');
62 $pdf->SetTitle(
'TCPDF Example 003');
63 $pdf->SetSubject(
'TCPDF Tutorial');
64 $pdf->SetKeywords(
'TCPDF, PDF, example, test, guide');
88 if (@file_exists(dirname(__FILE__).
'/lang/eng.php')) {
89 require_once(dirname(__FILE__).
'/lang/eng.php');
90 $pdf->setLanguageArray(
$l);
96 $pdf->SetFont(
'times',
'BI', 12);
109 $pdf->Write(0,
$txt,
'', 0,
'C',
true, 0,
false,
false, 0);
114 $pdf->Output(
'example_003.pdf',
'I');
const PDF_MARGIN_BOTTOM
Bottom margin.
const PDF_MARGIN_LEFT
Left margin.
const PDF_MARGIN_HEADER
Header margin.
const PDF_HEADER_STRING
Header description string.
const PDF_FONT_SIZE_MAIN
Default main font size.
const PDF_FONT_SIZE_DATA
Default data font size.
const PDF_FONT_NAME_MAIN
Default main font name.
getAliasNbPages()
Returns the string alias used for the total number of pages.
const K_PATH_IMAGES
Installation path (/var/www/tcpdf/).
PHP class for generating PDF documents without requiring external extensions.
const PDF_HEADER_LOGO_WIDTH
Header logo image width in user units.
SetFont($family, $style='', $size=null, $fontfile='', $subset='default', $out=true)
Sets the font used to print character strings.
const PDF_HEADER_LOGO
Deafult image logo used be the default Header() method.
getAliasNumPage()
Returns the string alias used for the page number.
const PDF_UNIT
Document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch].
const PDF_IMAGE_SCALE_RATIO
Ratio used to adjust the conversion of pixels to user units.
Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M')
Prints a cell (rectangular area) with optional borders, background color and character string...
SetY($y, $resetx=true, $rtloff=false)
Moves the current abscissa back to the left margin and sets the ordinate.
const PDF_PAGE_ORIENTATION
Page orientation (P=portrait, L=landscape).
Image($file, $x='', $y='', $w=0, $h=0, $type='', $link='', $align='', $resize=false, $dpi=300, $palign='', $ismask=false, $imgmask=false, $border=0, $fitbox=false, $hidden=false, $fitonpage=false, $alt=false, $altimgs=array())
Puts an image in the page.
Add a drawing to the header
const PDF_MARGIN_RIGHT
Right margin.
const PDF_HEADER_TITLE
Header title.
const PDF_FONT_NAME_DATA
Default data font name.
const PDF_CREATOR
Document creator.
const PDF_PAGE_FORMAT
Page format.
const PDF_FONT_MONOSPACED
Default monospaced font name.
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
const PDF_MARGIN_TOP
Top margin.
const PDF_MARGIN_FOOTER
Footer margin.