linea21-externals
[ class tree: linea21-externals ] [ index: linea21-externals ] [ all elements ]

Class: idd_pdf

Source Location: /class/system/tcpdf/idd_pdf.php

Class Overview

TCPDF
   |
   --idd_pdf

This is a PHP5 class for generating PDF files on-the-fly without requiring external extensions.


Author(s):

  • Nicola Asuni

Version:

  • 1.53.0.TC031

Variables

Methods


Inherited Variables

Inherited Methods

Class: TCPDF

TCPDF::__construct()
This is the class constructor.
TCPDF::AcceptPageBreak()
Whenever a page break condition is met, the method is called, and the break is issued or not depending on the returned value. The default implementation returns a value according to the mode selected by SetAutoPageBreak().
TCPDF::AddFont()
Imports a TrueType or Type1 font and makes it available. It is necessary to generate a font definition file first with the makefont.php utility. The definition file (and the font file itself when embedding) must be present either in the current directory or in the one indicated by FPDF_FONTPATH if the constant is defined. If it could not be found, the error "Could not include font definition file" is generated.
TCPDF::addHtmlLink()
Output anchor link.
TCPDF::AddLink()
Creates a new internal link and returns its identifier. An internal link is a clickable area which directs to another place within the document.
The identifier can then be passed to Cell(), Write(), Image() or Link(). The destination is defined with SetLink().
TCPDF::AddPage()
Adds a new page to the document. If a page is already present, the Footer() method is called first to output the footer. Then the page is added, the current position set to the top-left corner according to the left and top margins, and Header() is called to display the header.
TCPDF::AliasNbPages()
Defines an alias for the total number of pages. It will be substituted as the document is closed.
TCPDF::Cell()
Prints a cell (rectangular area) with optional borders, background color and character string. The upper-left corner of the cell corresponds to the current position. The text can be aligned or centered. After the call, the current position moves to the right or to the next line. It is possible to put a link on the text.
If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting.
TCPDF::Close()
Terminates the PDF document. It is not necessary to call this method explicitly because Output() does it automatically. If the document contains no page, AddPage() is called to prevent from getting an invalid document.
TCPDF::Error()
This method is automatically called in case of fatal error; it simply outputs the message and halts the execution. An inherited class may override it to customize the error handling but should always halt the script, or the resulting document would probably be invalid.
TCPDF::Footer()
This method is used to render the page footer.
TCPDF::getBreakMargin()
Returns the page break margin.
TCPDF::getImageScale()
Returns the image scale.
TCPDF::getPageHeight()
Returns the page height in units.
TCPDF::getPageWidth()
Returns the page width in units.
TCPDF::getPDFData()
Returns the PDF data.
TCPDF::getScaleFactor()
Returns the scale factor (number of points in user unit).
TCPDF::GetStringWidth()
Returns the length of a string in user unit. A font must be selected.
TCPDF::GetX()
Returns the abscissa of the current position.
TCPDF::GetY()
Returns the ordinate of the current position.
TCPDF::Header()
This method is used to render the page header.
TCPDF::Image()
Puts an image in the page. The upper-left corner must be given. The dimensions can be specified in different ways:
  • explicit width and height (expressed in user unit)
  • one explicit dimension, the other being calculated automatically in order to keep the original proportions
  • no explicit dimension, in which case the image is put at 72 dpi
Supported formats are JPEG and PNG.
TCPDF::Line()
Draws a line between two points.
TCPDF::Link()
Puts a link on a rectangular area of the page. Text or image links are generally put via Cell(), Write() or Image(), but this method can be useful for instance to define a clickable area inside an image.
TCPDF::Ln()
Performs a line break. The current abscissa goes back to the left margin and the ordinate increases by the amount passed in parameter.
TCPDF::MultiCell()
This method allows printing text with line breaks. They can be automatic (as soon as the text reaches the right border of the cell) or explicit (via the \n character). As many cells as necessary are output, one below the other.
Text can be aligned, centered or justified. The cell block can be framed and the background painted.
TCPDF::Open()
This method begins the generation of the PDF document. It is not necessary to call it explicitly because AddPage() does it automatically.
TCPDF::Output()
Send the document to a given destination: string, local file or browser. In the last case, the plug-in may be used (if present) or a download ("Save as" dialog box) may be forced.
The method first calls Close() if necessary to terminate the document.
TCPDF::PageNo()
Returns the current page number.
TCPDF::Rect()
Outputs a rectangle. It can be drawn (border only), filled (with no border) or both.
TCPDF::SetAuthor()
Defines the author of the document.
TCPDF::SetAutoPageBreak()
Enables or disables the automatic page breaking mode. When enabling, the second parameter is the distance from the bottom of the page that defines the triggering limit. By default, the mode is on and the margin is 2 cm.
TCPDF::setBarcode()
Set document barcode.
TCPDF::SetCompression()
Activates or deactivates page compression. When activated, the internal representation of each page is compressed, which leads to a compression ratio of about 2 for the resulting document. Compression is on by default.
TCPDF::SetCreator()
Defines the creator of the document. This is typically the name of the application that generates the PDF.
TCPDF::SetDisplayMode()
Defines the way the document is to be displayed by the viewer. The zoom level can be set: pages can be displayed entirely on screen, occupy the full width of the window, use real size, be scaled by a specific zooming factor or use viewer default (configured in the Preferences menu of Acrobat). The page layout can be specified too: single at once, continuous display, two columns or viewer default. By default, documents use the full width mode with continuous display.
TCPDF::SetDrawColor()
Defines the color used for all drawing operations (lines, rectangles and cell borders). It can be expressed in RGB components or gray scale. The method can be called before the first page is created and the value is retained from page to page.
TCPDF::SetFillColor()
Defines the color used for all filling operations (filled rectangles and cell backgrounds). It can be expressed in RGB components or gray scale. The method can be called before the first page is created and the value is retained from page to page.
TCPDF::SetFont()
Sets the font used to print character strings. It is mandatory to call this method at least once before printing text or the resulting document would not be valid.
TCPDF::SetFontSize()
Defines the size of the current font.
TCPDF::setFooterFont()
Set footer font.
TCPDF::setFooterMargin()
Set footer margin.
TCPDF::setHeaderData()
Set header data.
TCPDF::setHeaderFont()
Set header font.
TCPDF::setHeaderMargin()
Set header margin.
TCPDF::setImageScale()
Set the image scale.
TCPDF::SetKeywords()
Associates keywords with the document, generally in the form 'keyword1 keyword2 ...'.
TCPDF::setLanguageArray()
Set language array.
TCPDF::SetLeftMargin()
Defines the left margin. The method can be called before creating the first page. If the current abscissa gets out of page, it is brought back to the margin.
TCPDF::SetLineWidth()
Defines the line width. By default, the value equals 0.2 mm. The method can be called before the first page is created and the value is retained from page to page.
TCPDF::SetLink()
Defines the page and position a link points to
TCPDF::SetMargins()
Defines the left, top and right margins. By default, they equal 1 cm. Call this method to change them.
TCPDF::setPrintFooter()
Set a flag to print page footer.
TCPDF::setPrintHeader()
Set a flag to print page header.
TCPDF::SetRightMargin()
Defines the right margin. The method can be called before creating the first page.
TCPDF::SetSubject()
Defines the subject of the document.
TCPDF::SetTextColor()
Defines the color used for text. It can be expressed in RGB components or gray scale. The method can be called before the first page is created and the value is retained from page to page.
TCPDF::SetTitle()
Defines the title of the document.
TCPDF::SetTopMargin()
Defines the top margin. The method can be called before creating the first page.
TCPDF::SetX()
Defines the abscissa of the current position. If the passed value is negative, it is relative to the right of the page.
TCPDF::SetXY()
Defines the abscissa and ordinate of the current position. If the passed values are negative, they are relative respectively to the right and bottom of the page.
TCPDF::SetY()
Moves the current abscissa back to the left margin and sets the ordinate. If the passed value is negative, it is relative to the bottom of the page.
TCPDF::Text()
Prints a character string. The origin is on the left of the first charcter, on the baseline. This method allows to place a string precisely on the page, but it is usually easier to use Cell(), MultiCell() or Write() which are the standard methods to print text.
TCPDF::unhtmlentities()
Reverse function for htmlentities.
TCPDF::UTF8StringToArray()
Converts UTF-8 strings to codepoints array.
TCPDF::UTF8ToUTF16BE()
Converts UTF-8 strings to UTF16-BE.
TCPDF::Write()
This method prints text from the current position. When the right margin is reached (or the \n character is met) a line break occurs and text continues from the left margin. Upon method exit, the current position is left just at the end of the text. It is possible to put a link on the text.
TCPDF::writeBarcode()
Print Barcode.
TCPDF::writeHTML()
Allows to preserve some HTML formatting.
TCPDF::writeHTMLCell()
Prints a cell (rectangular area) with optional borders, background color and html text string. The upper-left corner of the cell corresponds to the current position. After the call, the current position moves to the right or to the next line.
If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting.
TCPDF::_begindoc()
Start document
TCPDF::_beginpage()
_beginpage
TCPDF::_dochecks()
Check for locale-related bug
TCPDF::_dounderline()
Underline text
TCPDF::_enddoc()
_enddoc
TCPDF::_endpage()
End of page contents
TCPDF::_escape()
Add \ before \, ( and )
TCPDF::_escapetext()
Format a text string
TCPDF::_freadint()
Read a 4-byte integer from file
TCPDF::_getfontpath()
Return fonts path
TCPDF::_newobj()
Begin a new object
TCPDF::_out()
Add a line to the document
TCPDF::_parsejpg()
Extract info from a JPEG file
TCPDF::_parsepng()
Extract info from a PNG file
TCPDF::_putcatalog()
_putcatalog
TCPDF::_putfonts()
Adds fonts
TCPDF::_putheader()
_putheader
TCPDF::_putimages()
_putimages
TCPDF::_putinfo()
_putinfo
TCPDF::_putpages()
_putpages
TCPDF::_putresourcedict()
_putresourcedict
TCPDF::_putresources()
_putresources
TCPDF::_putstream()
TCPDF::_puttrailer()
_puttrailer
TCPDF::_puttruetypeunicode()
Adds unicode fonts.
TCPDF::_putxobjectdict()
_putxobjectdict
TCPDF::_textstring()
Format a text string
TCPDF::__destruct()
Default destructor.

Class Details

[line 15]
This is a PHP5 class for generating PDF files on-the-fly without requiring external extensions.


This class is an extension and improvement of the FPDF class by Olivier Plathey (http://www.fpdf.org).
This version contains some changes: [porting to PHP5, support for UTF-8 Unicode, code style and formatting, php documentation (www.phpdoc.org), ISO page formats, minor improvements, image scale factor]
TCPDF project (http://tcpdf.sourceforge.net) is based on the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org).
To add your own TTF fonts please read /fonts/README.TXT




Tags:

author:  Nicola Asuni
version:  1.53.0.TC031


[ Top ]


Class Variables

$aligns =

[line 330]


Type:   mixed


[ Top ]

$OutlineRoot =

[line 182]


Type:   mixed


[ Top ]

$outlines = array()

[line 181]


Type:   mixed


[ Top ]

$widths =

[line 329]


Type:   mixed


[ Top ]



Class Methods


method Bookmark [line 184]

void Bookmark( $txt, [ $level = 0], [ $y = 0])



Parameters:

   $txt  
   $level  
   $y  

[ Top ]

method CheckPageBreak [line 371]

void CheckPageBreak( $h)



Parameters:

   $h  

[ Top ]

method CreateIndex [line 266]

void CreateIndex( [ $depth = 100])



Parameters:

   $depth  

[ Top ]

method Footer [line 53]

void Footer( )



Overrides TCPDF::Footer() (This method is used to render the page footer.)

[ Top ]

method FormatSdiInfo [line 30]

void FormatSdiInfo( $libelle)



Parameters:

   $libelle  

[ Top ]

method FormatSdiItem [line 20]

void FormatSdiItem( $libelle)



Parameters:

   $libelle  

[ Top ]

method Header [line 77]

void Header( )



Overrides TCPDF::Header() (This method is used to render the page header.)

[ Top ]

method MemImage [line 542]

void MemImage( $data, $x, $y, [ $w = 0], [ $h = 0], [ $link = ''])



Parameters:

   $data  
   $x  
   $y  
   $w  
   $h  
   $link  

[ Top ]

method MEM_IMAGE [line 431]

void MEM_IMAGE( [ $orientation = 'P'], [ $unit = 'mm'], [ $format = 'A4'])



Parameters:

   $orientation  
   $unit  
   $format  

[ Top ]

method NbLines [line 378]

void NbLines( $w, $txt)



Parameters:

   $w  
   $txt  

[ Top ]

method ParagraphBreak [line 42]

void ParagraphBreak( )



[ Top ]

method Row [line 344]

void Row( $data)



Parameters:

   $data  

[ Top ]

method SetAligns [line 338]

void SetAligns( $a)



Parameters:

   $a  

[ Top ]

method SetColor [line 105]

void SetColor( [string $ink = 'DOC_COLOR'], [string $type = 'FONT'])

idd_pdf::SetColor()



Parameters:

string   $ink  
string   $type   'TRACE' | 'FONT' | 'BCKG'

[ Top ]

method SetWidths [line 332]

void SetWidths( $w)



Parameters:

   $w  

[ Top ]

method _parsemempng [line 457]

void _parsemempng( $var)



Parameters:

   $var  

[ Top ]

method _putbookmarks [line 191]

void _putbookmarks( )



[ Top ]

method _putcatalog [line 252]

void _putcatalog( )



Overrides TCPDF::_putcatalog() (_putcatalog)

[ Top ]

method _putresources [line 246]

void _putresources( )



Overrides TCPDF::_putresources() (_putresources)

[ Top ]

method _readstr [line 439]

void _readstr( $var, &$pos, $n)



Parameters:

   $var  
   &$pos  
   $n  

[ Top ]

method _readstr_int [line 447]

void _readstr_int( $var, &$pos)



Parameters:

   $var  
   &$pos  

[ Top ]


Documentation generated on Fri, 16 Oct 2009 09:33:49 +0200 by phpDocumentor 1.4.1