[ Index ] |
PHP Cross Reference of Unnamed Project |
[Source view] [Print] [Project Stats]
This file is part of FPDI
Copyright: | Copyright (c) 2015 Setasign - Jan Slabon (http://www.setasign.com) |
License: | http://opensource.org/licenses/mit-license The MIT License |
Version: | 1.6.1 |
File Size: | 548 lines (17 kb) |
Included or required: | 1 time |
Referenced: | 0 times |
Includes or requires: | 1 file mod/assign/feedback/editpdf/fpdi/fpdi_bridge.php |
FPDF_TPL:: (14 methods):
beginTemplate()
endTemplate()
useTemplate()
getTemplateSize()
SetFont()
Image()
AddPage()
Link()
AddLink()
SetLink()
_putformxobjects()
_putimages()
_putxobjectdict()
_out()
beginTemplate($x = null, $y = null, $w = null, $h = null) X-Ref |
Start a template. This method starts a template. You can give own coordinates to build an own sized template. Pay attention, that the margins are adapted to the new template size. If you want to write outside the template, for example to build a clipped template, you have to set the margins and "cursor"-position manual after beginTemplate()-call. If no parameter is given, the template uses the current page-size. The method returns an id of the current template. This id is used later for using this template. Warning: A created template is saved in the resulting PDF at all events. Also if you don't use it after creation! param: int $x The x-coordinate given in user-unit param: int $y The y-coordinate given in user-unit param: int $w The width given in user-unit param: int $h The height given in user-unit return: int The id of new created template |
endTemplate() X-Ref |
End template. This method ends a template and reset initiated variables collected in {@link beginTemplate()}. return: int|boolean If a template is opened, the id is returned. If not a false is returned. |
useTemplate($tplIdx, $x = null, $y = null, $w = 0, $h = 0) X-Ref |
Use a template in current page or other template. You can use a template in a page or in another template. You can give the used template a new size. All parameters are optional. The width or height is calculated automatically if one is given. If no parameter is given the origin size as defined in {@link beginTemplate()} method is used. The calculated or used width and height are returned as an array. param: int $tplIdx A valid template-id param: int $x The x-position param: int $y The y-position param: int $w The new width of the template param: int $h The new height of the template return: array The height and width of the template (array('w' => ..., 'h' => ...)) |
getTemplateSize($tplIdx, $w = 0, $h = 0) X-Ref |
Get the calculated size of a template. If one size is given, this method calculates the other one. param: int $tplIdx A valid template-id param: int $w The width of the template param: int $h The height of the template return: array The height and width of the template (array('w' => ..., 'h' => ...)) |
SetFont($family, $style = '', $size = null, $fontfile = '', $subset = 'default', $out = true) X-Ref |
Sets the font used to print character strings. See FPDF/TCPDF documentation. |
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() X-Ref |
Puts an image. See FPDF/TCPDF documentation. |
AddPage($orientation = '', $format = '', $rotationOrKeepmargins = false, $tocpage = false) X-Ref |
Adds a new page to the document. See FPDF/TCPDF documentation. This method cannot be used if you'd started a template. |
Link($x, $y, $w, $h, $link, $spaces = 0) X-Ref |
Puts a link on a rectangular area of the page. Overwritten because adding links in a template will not work. |
AddLink() X-Ref |
Creates a new internal link and returns its identifier. Overwritten because adding links in a template will not work. |
SetLink($link, $y = 0, $page = -1) X-Ref |
Defines the page and position a link points to. Overwritten because adding links in a template will not work. |
_putformxobjects() X-Ref |
Writes the form XObjects to the PDF document. |
_putimages() X-Ref |
Output images. Overwritten to add {@link _putformxobjects()} after _putimages(). |
_putxobjectdict() X-Ref |
Writes the references of XObject resources to the document. Overwritten to add the the templates to the XObject resource dictionary. |
_out($s) X-Ref |
Writes bytes to the resulting document. Overwritten to delegate the data to the template buffer. param: string $s |
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |