tcpdf.php File Reference

Go to the source code of this file.

Functions

 openHTMLTagHandler (&$dom, $key, $cell=false)
 closeHTMLTagHandler (&$dom, $key, $cell=false)
 addHTMLVertSpace ($n, $cell=false, $h='', $firstorlast=false, $tag='', $closing=false)
 setLIsymbol ($symbol='!')
 SetBooklet ($booklet=true, $inner=-1, $outer=-1)
 swapMargins ($reverse=true)
 setHtmlVSpace ($tagvs)
 setListIndentWidth ($width)
 setOpenCell ($isopen)
 setHtmlLinksStyle ($color=array(0, 0, 255), $fontstyle='U')
 getHTMLUnitToUnits ($htmlval, $refsize=1, $defaultunit='px', $points=false)
 intToRoman ($number)
 putHtmlListBullet ($listdepth, $listtype='', $size=10)
 getGraphicVars ()
 setGraphicVars ($gvars)
 getObjFilename ($name)
 writeDiskCache ($filename, $data, $append=false)
 readDiskCache ($filename)
 setBuffer ($data)
 getBuffer ()
 setPageBuffer ($page, $data, $append=false)
 getPageBuffer ($page)
 setImageBuffer ($image, $data)
 setImageSubBuffer ($image, $key, $data)
 getImageBuffer ($image)
 setFontBuffer ($font, $data)
 setFontSubBuffer ($font, $key, $data)
 getFontBuffer ($font)
 movePage ($frompage, $topage)
 deletePage ($page)
 addTOC ($page='', $numbersfont='', $filler='.')
 startTransaction ()
 commitTransaction ()
 rollbackTransaction ()
 objclone ($object)
 empty_string ($str)

Variables

 $ns = substr_count($tvalue, chr(32))
 $spacewidth = (($tw - $linew + (($no - $ns) * $this->GetStringWidth(chr(32)))) / ($ns?$ns:1)) * $this->k
 $spacewidthu = ($tw - $linew + ($no * $this->GetStringWidth(chr(32)))) / ($ns?$ns:1) / $this->FontSize / $this->k
 $nsmax = $ns
 $offset = 0
 $strcount = 0
 $prev_epsposbeg = 0
global $spacew
 $epsposbeg = strpos($pmid, 'q'.$this->epsmarker, $offset)
 $epsposend = strpos($pmid, $this->epsmarker.'Q', $offset) + strlen($this->epsmarker.'Q')
 $pmid_b = substr($pmid, 0, $epsposbeg)
 $pmid_m = substr($pmid, $epsposbeg, ($epsposend - $epsposbeg))
 $pmid_e = substr($pmid, $epsposend)
 $pmid = $pmid_b."\nq\n".$trx."\n".$pmid_m."\nQ\n".$pmid_e
 continue
 $currentxpos = 0
 break
case __pad0__
case $xmatches
case __pad1__
$this PageAnnots [$this->page][$pak]['w'] = (($spacewidth * $pac['numspaces']) / $this->k)
 $endlinepos = strlen($pstart."\n".$pmid."\n")
 $pbrk = $this->checkPageBreak($this->lasth)
 $startlinex = $this->x
 $startliney = $this->y
 $minstartliney = $this->y
 $startlinepage = $this->page
 $pstart = substr($this->getPageBuffer($startlinepage), 0, $startlinepos)
 $pend = substr($this->getPageBuffer($startlinepage), $midpos)
 $mdiff = abs($tw - $linew)


Function Documentation

addHTMLVertSpace ( n,
cell = false,
h = '',
firstorlast = false,
tag = '',
closing = false 
) [protected]

Add vertical spaces if needed.

Parameters:
int $n number of spaces to add
boolean $cell if true add the default cMargin space to each new line (default false).
string $h The height of the break. By default, the value equals the height of the last printed cell.
boolean $firstorlast if true do not print additional empty lines.
string $tag HTML tag to which this space will be applied
boolean $closing true if this space will be applied to a closing tag, false otherwise protected

Definition at line 12675 of file tcpdf.php.

addTOC ( page = '',
numbersfont = '',
filler = '.' 
)

Output a Table of Content Index (TOC). You can override this method to achieve different styles.

Parameters:
int $page page number where this TOC should be inserted (leave empty for current page).
string $numbersfont set the font for page numbers (please use monospaced font for better alignment).
string $filler string used to fill the space between text and page number. public
Author:
Nicola Asuni
Since:
4.5.000 (2009-01-02)

Definition at line 13697 of file tcpdf.php.

closeHTMLTagHandler ( &$  dom,
key,
cell = false 
) [protected]

Process closing tags.

Parameters:
array $dom html dom array
int $key current element id
boolean $cell if true add the default cMargin space to each new line (default false). protected

Definition at line 12351 of file tcpdf.php.

commitTransaction (  ) 

Delete the copy of the current TCPDF object used for undo operation. public

Since:
4.5.029 (2009-03-19)

Definition at line 13854 of file tcpdf.php.

deletePage ( page  ) 

Remove the specified page.

Parameters:
int $page page to remove
Returns:
true in case of success, false in case of error. public
Since:
4.6.004 (2009-04-23)

Definition at line 13557 of file tcpdf.php.

empty_string ( str  ) 

Determine whether a string is empty.

Parameters:
srting $str string to be checked
Returns:
boolean true if string is empty public
Since:
4.5.044 (2009-04-16)

Definition at line 13901 of file tcpdf.php.

getBuffer (  )  [protected]

Get buffer content.

Returns:
string buffer content protected
Since:
4.5.000 (2009-01-02)

Definition at line 13243 of file tcpdf.php.

getFontBuffer ( font  )  [protected]

Get font buffer content.

Parameters:
string $font font key
Returns:
string font buffer content or false in case of error protected
Since:
4.5.000 (2009-01-02)

Definition at line 13403 of file tcpdf.php.

getGraphicVars (  )  [protected]

Returns current graphic variables as array.

Returns:
array graphic variables protected
Since:
4.2.010 (2008-11-14)

Definition at line 13111 of file tcpdf.php.

getHTMLUnitToUnits ( htmlval,
refsize = 1,
defaultunit = 'px',
points = false 
)

convert html string containing value and unit of measure to user's units or points.

Parameters:
string $htmlval string containing values and unit
string $refsize reference value in points
string $defaultunit default unit (can be one of the following: %, em, ex, px, in, mm, pc, pt).
boolean $point if true returns points, otherwise returns value in user's units
Returns:
float value in user's unit or point if $points=true public
Since:
4.4.004 (2008-12-10)

Definition at line 12830 of file tcpdf.php.

getImageBuffer ( image  )  [protected]

Get page buffer content.

Parameters:
string $image image key
Returns:
string image buffer content or false in case of error protected
Since:
4.5.000 (2008-12-31)

Definition at line 13345 of file tcpdf.php.

getObjFilename ( name  )  [protected]

Returns a temporary filename for caching object on filesystem.

Parameters:
string $prefix prefix to add to filename return string filename. protected
Since:
4.5.000 (2008-12-31)

Definition at line 13175 of file tcpdf.php.

getPageBuffer ( page  )  [protected]

Get page buffer content.

Parameters:
int $page page number
Returns:
string page buffer content or false in case of error protected
Since:
4.5.000 (2008-12-31)

Definition at line 13286 of file tcpdf.php.

intToRoman ( number  ) 

Returns the Roman representation of an integer number

Parameters:
int number to convert
Returns:
string roman representation of the specified number public
Since:
4.4.004 (2008-12-10)

Definition at line 12904 of file tcpdf.php.

movePage ( frompage,
topage 
)

Move a page to a previous position.

Parameters:
int $frompage number of the source page
int $topage number of the destination page (must be less than $frompage)
Returns:
true in case of success, false in case of error. public
Since:
4.5.000 (2009-01-02)

Definition at line 13420 of file tcpdf.php.

objclone ( object  ) 

Creates a copy of a class object

Parameters:
object $object class object to be cloned
Returns:
cloned object public
Since:
4.5.029 (2009-03-19)

Definition at line 13890 of file tcpdf.php.

openHTMLTagHandler ( &$  dom,
key,
cell = false 
) [protected]

Process opening tags.

Parameters:
array $dom html dom array
int $key current element id
boolean $cell if true add the default cMargin space to each new line (default false). protected

Definition at line 12027 of file tcpdf.php.

putHtmlListBullet ( listdepth,
listtype = '',
size = 10 
) [protected]

Output an HTML list bullet or ordered item symbol

Parameters:
int $listdepth list nesting level
string $listtype type of list
float $size current font size protected
Since:
4.4.004 (2008-12-10)

Definition at line 12969 of file tcpdf.php.

readDiskCache ( filename  )  [protected]

Read data from a temporary file on filesystem.

Parameters:
string $file file name
Returns:
mixed retrieved data protected
Since:
4.5.000 (2008-12-31)

Definition at line 13215 of file tcpdf.php.

rollbackTransaction (  ) 

This method allows to undo the latest transaction by returning the latest saved TCPDF object with startTransaction().

Returns:
TCPDF object. public
Since:
4.5.029 (2009-03-19)

Definition at line 13867 of file tcpdf.php.

SetBooklet ( booklet = true,
inner = -1,
outer = -1 
)

Set the booklet mode for double-sided pages.

Parameters:
boolean $booklet true set the booklet mode on, fals eotherwise.
float $inner Inner page margin.
float $outer Outer page margin. public
Since:
4.2.000 (2008-10-29)

Definition at line 12744 of file tcpdf.php.

setBuffer ( data  )  [protected]

Set buffer content (always append data).

Parameters:
string $data data protected
Since:
4.5.000 (2009-01-02)

Definition at line 13225 of file tcpdf.php.

setFontBuffer ( font,
data 
) [protected]

Set font buffer content.

Parameters:
string $font font key
array $data font data protected
Since:
4.5.000 (2009-01-02)

Definition at line 13361 of file tcpdf.php.

setFontSubBuffer ( font,
key,
data 
) [protected]

Set font buffer content.

Parameters:
string $font font key
string $key font sub-key
array $data font data protected
Since:
4.5.000 (2009-01-02)

Definition at line 13383 of file tcpdf.php.

setGraphicVars ( gvars  )  [protected]

Set graphic variables.

Parameters:
$gvars array graphic variables protected
Since:
4.2.010 (2008-11-14)

Definition at line 13142 of file tcpdf.php.

setHtmlLinksStyle ( color = array(0,0,255),
fontstyle = 'U' 
)

Set the color and font style for HTML links.

Parameters:
array $color RGB array of colors
string $fontstyle additional font styles to add public
Since:
4.4.003 (2008-12-09)

Definition at line 12815 of file tcpdf.php.

setHtmlVSpace ( tagvs  ) 

Set the vertical spaces for HTML tags. The array must have the following structure (example): $tagvs = array('h1' => array(0 => array('h' => '', 'n' => 2), 1 => array('h' => 1.3, 'n' => 1))); The first array level contains the tag names, the second level contains 0 for opening tags or 1 for closing tags, the third level contains the vertical space unit (h) and the number spaces to add (n). If the h parameter is not specified, default values are used.

Parameters:
array $tagvs array of tags and relative vertical spaces. public
Since:
4.2.001 (2008-10-30)

Definition at line 12784 of file tcpdf.php.

setImageBuffer ( image,
data 
) [protected]

Set image buffer content.

Parameters:
string $image image key
array $data image data protected
Since:
4.5.000 (2008-12-31)

Definition at line 13302 of file tcpdf.php.

setImageSubBuffer ( image,
key,
data 
) [protected]

Set image buffer content.

Parameters:
string $image image key
string $key image sub-key
array $data image data protected
Since:
4.5.000 (2008-12-31)

Definition at line 13325 of file tcpdf.php.

setListIndentWidth ( width  ) 

Set custom width for list indentation.

Parameters:
float $width width of the indentation. Use negative value to disable it. public
Since:
4.2.007 (2008-11-12)

Definition at line 12794 of file tcpdf.php.

setLIsymbol ( symbol = '!'  ) 

Set the default bullet to be used as LI bullet symbol

Parameters:
string $symbol character or string to be used (legal values are: '' = automatic, '!' = auto bullet, '#' = auto numbering, 'disc', 'disc', 'circle', 'square', '1', 'decimal', 'decimal-leading-zero', 'i', 'lower-roman', 'I', 'upper-roman', 'a', 'lower-alpha', 'lower-latin', 'A', 'upper-alpha', 'upper-latin', 'lower-greek') public
Since:
4.0.028 (2008-09-26)

Definition at line 12704 of file tcpdf.php.

setOpenCell ( isopen  ) 

Set the top/bottom cell sides to be open or closed when the cell cross the page.

Parameters:
boolean $isopen if true keeps the top/bottom border open for the cell sides that cross the page. public
Since:
4.2.010 (2008-11-14)

Definition at line 12804 of file tcpdf.php.

setPageBuffer ( page,
data,
append = false 
) [protected]

Set page buffer content.

Parameters:
int $page page number
string $data page data
boolean $append if true append data, false replace. protected
Since:
4.5.000 (2008-12-31)

Definition at line 13259 of file tcpdf.php.

startTransaction (  ) 

Stores a copy of the current TCPDF object used for undo operation. public

Since:
4.5.029 (2009-03-19)

Definition at line 13840 of file tcpdf.php.

swapMargins ( reverse = true  )  [protected]

Swap the left and right margins.

Parameters:
boolean $reverse if true swap left and right margins. protected
Since:
4.2.000 (2008-10-29)

Definition at line 12760 of file tcpdf.php.

writeDiskCache ( filename,
data,
append = false 
) [protected]

Writes data to a temporary file on filesystem.

Parameters:
string $file file name
mixed $data data to write on file
boolean $append if true append data, false replace. protected
Since:
4.5.000 (2008-12-31)

Definition at line 13187 of file tcpdf.php.


Variable Documentation

$currentxpos = 0

Definition at line 11508 of file tcpdf.php.

$endlinepos = strlen($pstart."\n".$pmid."\n")

Definition at line 11592 of file tcpdf.php.

$epsposbeg = strpos($pmid, 'q'.$this->epsmarker, $offset)

Definition at line 11493 of file tcpdf.php.

$epsposend = strpos($pmid, $this->epsmarker.'Q', $offset) + strlen($this->epsmarker.'Q')

Definition at line 11494 of file tcpdf.php.

$mdiff = abs($tw - $linew)

Definition at line 11974 of file tcpdf.php.

$minstartliney = $this->y

Definition at line 11628 of file tcpdf.php.

$ns = substr_count($tvalue, chr(32))

Definition at line 11471 of file tcpdf.php.

$nsmax = $ns

Definition at line 11479 of file tcpdf.php.

$offset = 0

Definition at line 11482 of file tcpdf.php.

$pbrk = $this->checkPageBreak($this->lasth)

Definition at line 11621 of file tcpdf.php.

$pend = substr($this->getPageBuffer($startlinepage), $midpos)

Definition at line 11961 of file tcpdf.php.

$pmid = $pmid_b."\nq\n".$trx."\n".$pmid_m."\nQ\n".$pmid_e

Definition at line 11503 of file tcpdf.php.

$pmid_b = substr($pmid, 0, $epsposbeg)

Definition at line 11500 of file tcpdf.php.

$pmid_e = substr($pmid, $epsposend)

Definition at line 11502 of file tcpdf.php.

$pmid_m = substr($pmid, $epsposbeg, ($epsposend - $epsposbeg))

Definition at line 11501 of file tcpdf.php.

$prev_epsposbeg = 0

Definition at line 11484 of file tcpdf.php.

$pstart = substr($this->getPageBuffer($startlinepage), 0, $startlinepos)

Definition at line 11947 of file tcpdf.php.

global $spacew

Definition at line 11485 of file tcpdf.php.

$spacewidth = (($tw - $linew + (($no - $ns) * $this->GetStringWidth(chr(32)))) / ($ns?$ns:1)) * $this->k

Definition at line 11477 of file tcpdf.php.

$spacewidthu = ($tw - $linew + ($no * $this->GetStringWidth(chr(32)))) / ($ns?$ns:1) / $this->FontSize / $this->k

Definition at line 11478 of file tcpdf.php.

$startlinepage = $this->page

Definition at line 11629 of file tcpdf.php.

$startlinex = $this->x

Definition at line 11626 of file tcpdf.php.

$startliney = $this->y

Definition at line 11627 of file tcpdf.php.

$strcount = 0

Definition at line 11483 of file tcpdf.php.

case $xmatches

Definition at line 11543 of file tcpdf.php.

case __pad0__

Definition at line 11543 of file tcpdf.php.

case __pad1__

Definition at line 11554 of file tcpdf.php.

Definition at line 11539 of file tcpdf.php.

Definition at line 11505 of file tcpdf.php.

$this PageAnnots[$this->page][$pak]['w'] = (($spacewidth * $pac['numspaces']) / $this->k)

Definition at line 11571 of file tcpdf.php.


Generated on Wed Jun 17 12:09:05 2009 for OXID eShop CE by  doxygen 1.5.5