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) |
addHTMLVertSpace | ( | $ | n, | |
$ | cell = false , |
|||
$ | h = '' , |
|||
$ | firstorlast = false , |
|||
$ | tag = '' , |
|||
$ | closing = false | |||
) | [protected] |
Add vertical spaces if needed.
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 |
addTOC | ( | $ | page = '' , |
|
$ | numbersfont = '' , |
|||
$ | filler = '.' | |||
) |
Output a Table of Content Index (TOC). You can override this method to achieve different styles.
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 |
closeHTMLTagHandler | ( | &$ | dom, | |
$ | key, | |||
$ | cell = false | |||
) | [protected] |
commitTransaction | ( | ) |
deletePage | ( | $ | page | ) |
empty_string | ( | $ | str | ) |
getBuffer | ( | ) | [protected] |
getFontBuffer | ( | $ | font | ) | [protected] |
getGraphicVars | ( | ) | [protected] |
getHTMLUnitToUnits | ( | $ | htmlval, | |
$ | refsize = 1 , |
|||
$ | defaultunit = 'px' , |
|||
$ | points = false | |||
) |
convert html string containing value and unit of measure to user's units or points.
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 |
getImageBuffer | ( | $ | image | ) | [protected] |
getObjFilename | ( | $ | name | ) | [protected] |
getPageBuffer | ( | $ | page | ) | [protected] |
intToRoman | ( | $ | number | ) |
movePage | ( | $ | frompage, | |
$ | topage | |||
) |
objclone | ( | $ | object | ) |
openHTMLTagHandler | ( | &$ | dom, | |
$ | key, | |||
$ | cell = false | |||
) | [protected] |
putHtmlListBullet | ( | $ | listdepth, | |
$ | listtype = '' , |
|||
$ | size = 10 | |||
) | [protected] |
readDiskCache | ( | $ | filename | ) | [protected] |
rollbackTransaction | ( | ) |
This method allows to undo the latest transaction by returning the latest saved TCPDF object with startTransaction().
SetBooklet | ( | $ | booklet = true , |
|
$ | inner = -1 , |
|||
$ | outer = -1 | |||
) |
setBuffer | ( | $ | data | ) | [protected] |
setFontBuffer | ( | $ | font, | |
$ | data | |||
) | [protected] |
setFontSubBuffer | ( | $ | font, | |
$ | key, | |||
$ | data | |||
) | [protected] |
setGraphicVars | ( | $ | gvars | ) | [protected] |
setHtmlLinksStyle | ( | $ | color = array(0,0,255) , |
|
$ | fontstyle = 'U' | |||
) |
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.
array | $tagvs array of tags and relative vertical spaces. public |
setImageBuffer | ( | $ | image, | |
$ | data | |||
) | [protected] |
setImageSubBuffer | ( | $ | image, | |
$ | key, | |||
$ | data | |||
) | [protected] |
setListIndentWidth | ( | $ | width | ) |
setLIsymbol | ( | $ | symbol = '!' |
) |
Set the default bullet to be used as LI bullet symbol
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 |
setOpenCell | ( | $ | isopen | ) |
setPageBuffer | ( | $ | page, | |
$ | data, | |||
$ | append = false | |||
) | [protected] |
startTransaction | ( | ) |
swapMargins | ( | $ | reverse = true |
) | [protected] |
writeDiskCache | ( | $ | filename, | |
$ | data, | |||
$ | append = false | |||
) | [protected] |
$epsposbeg = strpos($pmid, 'q'.$this->epsmarker, $offset) |
$epsposend = strpos($pmid, $this->epsmarker.'Q', $offset) + strlen($this->epsmarker.'Q') |
$pend = substr($this->getPageBuffer($startlinepage), $midpos) |
$pmid = $pmid_b."\nq\n".$trx."\n".$pmid_m."\nQ\n".$pmid_e |
$pmid_m = substr($pmid, $epsposbeg, ($epsposend - $epsposbeg)) |
$pstart = substr($this->getPageBuffer($startlinepage), 0, $startlinepos) |
$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 |
$this PageAnnots[$this->page][$pak]['w'] = (($spacewidth * $pac['numspaces']) / $this->k) |