class | TCPDF_IMPORT
!!! THIS CLASS IS UNDER DEVELOPMENT !!!
PHP class extension of the TCPDF (http://www.tcpdf.org) library to import existing PDF documents. |
---|---|
package | com.tecnick.tcpdf |
brief | PHP class extension of the TCPDF library to import existing PDF documents. |
version | 1.0.001 |
author | Nicola Asuni - info@tecnick.com |
__construct(string $orientation = 'P',string $unit = 'mm',mixed $format = 'A4',boolean $unicode = true,string $encoding = 'UTF-8',boolean $diskcache = false,false|integer $pdfa = false)
It allows to set up the page format, the orientation and the measure unit used in all the methods (except for the font sizes).
public | |
---|---|
see | \getPageSizeFromFormat(), setPageFormat() |
string
page orientation. Possible values are (case insensitive):
string
User measure unit. Possible values are:
mixed
The format used for pages. It can be either: one of the string values specified at getPageSizeFromFormat() or an array of parameters specified at setPageFormat().
boolean
TRUE means that the input text is unicode (default = true)
string
Charset encoding (used only when converting back html entities); default is UTF-8.
boolean
DEPRECATED FEATURE
false|integer
If not false, set the document to PDF/A mode and the good version (1 or 3).
__destruct()
public | |
---|---|
since | 1.53.0.TC016 |
_addfield(string $type,string $name,integer $x,integer $y,integer $w,integer $h,array $prop)
protected | |
---|---|
author | Denis Van Nuffelen, Nicola Asuni |
since | 2.1.002 (2008-02-12) |
string
field type
string
field name
integer
horizontal position
integer
vertical position
integer
width
integer
height
array
javascript field properties. Possible values are described on official Javascript for Acrobat API reference.
_beginpage(string $orientation = '',mixed $format = '')
protected | |
---|---|
see | \getPageSizeFromFormat(), setPageFormat() |
string
page orientation. Possible values are (case insensitive):
mixed
The format used for pages. It can be either: one of the string values specified at getPageSizeFromFormat() or an array of parameters specified at setPageFormat().
_datastring(string $s,integer $n): string
protected |
---|
string
data string to escape.
integer
object ID
string
escaped string.
_datestring(integer $n,integer $timestamp): string
protected | |
---|---|
since | 4.6.028 (2009-08-25) |
integer
Object ID.
integer
Timestamp to convert.
string
escaped date string.
_destroy(boolean $destroyall = false,boolean $preserve_objcopy = false)
public | |
---|---|
since | 4.5.016 (2009-02-24) |
boolean
if true destroys all class variables, otherwise preserves critical variables.
boolean
if true preserves the objcopy variable
_dochecks()
protected | |
---|---|
_dolinethrough(integer $x,integer $y,string $txt)
protected | |
---|---|
integer
X coordinate
integer
Y coordinate
string
text to linethrough
_dolinethroughw(integer $x,integer $y,integer $w)
protected | |
---|---|
since | 4.9.008 (2009-09-29) |
integer
X coordinate
integer
Y coordinate
integer
line length (width)
_dooverline(integer $x,integer $y,string $txt)
protected | |
---|---|
since | 4.9.015 (2010-04-19) |
integer
X coordinate
integer
Y coordinate
string
text to overline
_dooverlinew(integer $x,integer $y,integer $w)
protected | |
---|---|
since | 4.9.015 (2010-04-19) |
integer
X coordinate
integer
Y coordinate
integer
width to overline
_dounderline(integer $x,integer $y,string $txt)
protected | |
---|---|
integer
X coordinate
integer
Y coordinate
string
text to underline
_dounderlinew(integer $x,integer $y,integer $w)
protected | |
---|---|
since | 4.8.008 (2009-09-29) |
integer
X coordinate
integer
Y coordinate
integer
width to underline
_encrypt_data(integer $n,string $s): string
protected | |
---|---|
author | Nicola Asuni |
since | 5.0.005 (2010-05-11) |
integer
object number
string
data string to encrypt
string
encrypted string
_enddoc()
protected | |
---|---|
_endpage()
protected | |
---|---|
_fixAES256Password(string $password): string
protected | |
---|---|
since | 5.9.006 (2010-10-19) |
author | Nicola Asuni |
string
password
string
password
_generateencryptionkey()
protected | |
---|---|
since | 2.0.000 (2008-01-02) |
author | Nicola Asuni |
_getannotsrefs(integer $n): string
protected | |
---|---|
author | Nicola Asuni |
since | 5.0.010 (2010-05-17) |
integer
page number
string
_getobj(integer|null $objid = null): string
protected | |
---|---|
since | 5.8.009 (2010-08-20) |
integer|null
Object ID (leave empty to get a new ID).
string
the starting object string
_getrawstream(string $s,integer $n)
protected | |
---|---|
author | Nicola Asuni |
since | 5.5.000 (2010-06-22) |
string
string to output.
integer
object reference for encryption mode
_getxobjectdict(): string
protected | |
---|---|
since | 5.8.014 (2010-08-23) |
string
XObjects dictionary
_newobj(): integer
protected | |
---|---|
integer
object number
_objectkey(integer $n): integer
This is used for all strings and streams without crypt filter specifier.
protected | |
---|---|
author | Nicola Asuni |
since | 2.0.000 (2008-01-02) |
integer
object number
integer
object key
_OEvalue(): string
protected | |
---|---|
since | 5.9.006 (2010-10-19) |
author | Nicola Asuni |
string
OE value
_out(string $s)
protected | |
---|---|
string
string to output.
_outCurve(float $x1,float $y1,float $x2,float $y2,float $x3,float $y3)
The new current point shall be (x3, y3).
protected | |
---|---|
since | 2.1.000 (2008-01-08) |
float
Abscissa of control point 1.
float
Ordinate of control point 1.
float
Abscissa of control point 2.
float
Ordinate of control point 2.
float
Abscissa of end point.
float
Ordinate of end point.
_outCurveV(float $x2,float $y2,float $x3,float $y3)
The new current point shall be (x3, y3).
protected | |
---|---|
since | 4.9.019 (2010-04-26) |
float
Abscissa of control point 2.
float
Ordinate of control point 2.
float
Abscissa of end point.
float
Ordinate of end point.
_outCurveY(float $x1,float $y1,float $x3,float $y3)
The new current point shall be (x3, y3).
protected | |
---|---|
since | 2.1.000 (2008-01-08) |
float
Abscissa of control point 1.
float
Ordinate of control point 1.
float
Abscissa of end point.
float
Ordinate of end point.
_outellipticalarc(float $xc,float $yc,float $rx,float $ry,float $xang,float $angs,float $angf = 360,boolean $pie = false,integer $nc = 2,boolean $startpoint = true,boolean $ccw = true,boolean $svg = false): array
An ellipse is formed from n Bezier curves.
author | Nicola Asuni |
---|---|
protected | |
since | 4.9.019 (2010-04-26) |
float
Abscissa of center point.
float
Ordinate of center point.
float
Horizontal radius.
float
Vertical radius (if ry = 0 then is a circle, see Circle()). Default value: 0.
float
Angle between the X-axis and the major axis of the ellipse. Default value: 0.
float
Angle start of draw line. Default value: 0.
float
Angle finish of draw line. Default value: 360.
boolean
if true do not mark the border point (used to draw pie sectors).
integer
Number of curves used to draw a 90 degrees portion of ellipse.
boolean
if true output a starting point.
boolean
if true draws in counter-clockwise.
boolean
if true the angles are in svg mode (already calculated).
array
bounding box coordinates (x min, y min, x max, y max)
_outLine(float $x,float $y)
The new current point shall be (x, y).
protected | |
---|---|
since | 2.1.000 (2008-01-08) |
float
Abscissa of end point.
float
Ordinate of end point.
_outPoint(float $x,float $y)
protected | |
---|---|
since | 2.1.000 (2008-01-08) |
float
Abscissa of point.
float
Ordinate of point.
_outRect(float $x,float $y,float $w,float $h,string $op)
protected | |
---|---|
since | 2.1.000 (2008-01-08) |
float
Abscissa of upper-left corner.
float
Ordinate of upper-left corner.
float
Width.
float
Height.
string
options
_outRestoreGraphicsState()
protected | |
---|---|
_outSaveGraphicsState()
protected | |
---|---|
_Ovalue(): string
protected | |
---|---|
since | 2.0.000 (2008-01-02) |
author | Nicola Asuni |
string
O value
_putannotsobjs()
!!! THIS METHOD IS NOT YET COMPLETED !!! See section 12.5 of PDF 32000_2008 reference.
protected | |
---|---|
author | Nicola Asuni |
since | 4.0.018 (2008-08-06) |
_putAPXObject(integer $w,integer $h,string $stream = ''): integer
protected | |
---|---|
since | 4.8.001 (2009-09-09) |
integer
annotation width
integer
annotation height
string
appearance stream
integer
object ID
_putbookmarks()
protected | |
---|---|
author | Olivier Plathey, Nicola Asuni |
since | 2.1.002 (2008-02-12) |
_putcatalog(): integer
protected | |
---|---|
integer
object id
_putcidfont0(array $font)
A Type 0 CIDFont contains glyph descriptions based on the Adobe Type 1 font format
protected | |
---|---|
author | Andrew Whitehead, Nicola Asuni, Yukihiro Nakadaira |
since | 3.2.000 (2008-06-23) |
array
font data
_putdests()
protected | |
---|---|
author | Johannes G\FCntert, Nicola Asuni |
since | 5.9.098 (2011-06-23) |
_putEmbeddedFiles()
since | 4.4.000 (2008-12-07) |
---|---|
protected | |
see | \TCPDF::Annotation() |
_putencryption()
protected | |
---|---|
author | Nicola Asuni |
since | 2.0.000 (2008-01-02) |
_putextgstates()
protected | |
---|---|
since | 3.0.000 (2008-03-27) |
_putfonts()
author | Nicola Asuni |
---|---|
protected | |
_putheader()
protected | |
---|---|
_putimages()
protected | |
---|---|
_putinfo(): integer
protected | |
---|---|
integer
object id
_putjavascript()
protected | |
---|---|
author | Johannes G\FCntert, Nicola Asuni |
since | 2.1.002 (2008-02-12) |
_putocg()
protected | |
---|---|
since | 3.0.000 (2008-03-27) |
_putpages()
protected | |
---|---|
_putresourcedict()
protected | |
---|---|
_putresources()
protected | |
---|---|
_putshaders()
author | Nicola Asuni |
---|---|
since | 3.1.000 (2008-06-09) |
protected | |
_putsignature()
protected | |
---|---|
author | Nicola Asuni |
since | 4.6.008 (2009-05-07) |
_putspotcolors()
protected | |
---|---|
since | 4.0.024 (2008-09-12) |
_puttruetypeunicode(array $font)
protected | |
---|---|
author | Nicola Asuni |
since | 1.52.0.TC005 (2005-01-05) |
array
font data
_putviewerpreferences(): string
author | Nicola asuni |
---|---|
since | 3.1.000 (2008-06-09) |
protected | |
string
for viewer preferences
_putXMP(): integer
since | 5.9.121 (2011-09-28) |
---|---|
protected | |
integer
The object ID.
_putxobjects()
author | Nicola Asuni |
---|---|
since | 5.8.017 (2010-08-24) |
protected | |
see | \startTemplate(), endTemplate(), printTemplate() |
_textstring(string $s,integer $n): string
protected |
---|
string
string to escape.
integer
object ID
string
escaped string.
_UEvalue(): string
protected | |
---|---|
since | 5.9.006 (2010-10-19) |
author | Nicola Asuni |
string
UE value
_Uvalue(): string
protected | |
---|---|
since | 2.0.000 (2008-01-02) |
author | Nicola Asuni |
string
U value
AcceptPageBreak(): boolean
The default implementation returns a value according to the mode selected by SetAutoPageBreak().
This method is called automatically and should not be called directly by the application.
public | |
---|---|
since | 1.4 |
see | \SetAutoPageBreak() |
boolean
addEmptySignatureAppearance(float $x,float $y,float $w,float $h,integer $page = -1,string $name = '')
public | |
---|---|
author | Nicola Asuni |
since | 5.9.101 (2011-07-06) |
float
Abscissa of the upper-left corner.
float
Ordinate of the upper-left corner.
float
Width of the signature area.
float
Height of the signature area.
integer
option page number (if < 0 the current page is used).
string
Name of the signature.
addExtGState(array $parms): integer|void
protected | |
---|---|
since | 3.0.000 (2008-03-27) |
array
parameters
integer|void
the number of extgstates
AddFont(string $family,string $style = '',string $fontfile = '',mixed $subset = 'default'): array|false
It is necessary to generate a font definition file first (read /fonts/utils/README.TXT). The definition file (and the font file itself when embedding) must be present either in the current directory or in the one indicated by K_PATH_FONTS if the constant is defined. If it could not be found, the error "Could not include font definition file" is generated.
public | |
---|---|
since | 1.5 |
see | \SetFont(), setFontSubsetting() |
string
Font family. The name can be chosen arbitrarily. If it is a standard family name, it will override the corresponding font.
string
Font style. Possible values are (case insensitive):
string
The font definition file. By default, the name is built from the family and style, in lower case with no spaces.
mixed
if true embedd only a subset of the font (stores only the information related to the used characters); if false embedd full font; if 'default' uses the default value set using setFontSubsetting(). This option is valid only for TrueTypeUnicode fonts. If you want to enable users to change the document, set this parameter to false. If you subset the font, the person who receives your PDF would need to have your same font in order to make changes to your PDF. The file size of the PDF would also be smaller because you are embedding only part of a font.
array|false
array containing the font data, or false in case of error.
addHtmlLink(string $url,string $name,boolean $fill = false,boolean $firstline = false,array|null $color = null,string $style = -1,boolean $firstblock = false): integer
public |
---|
string
link URL or internal link (i.e.: <a href="#23,4.5">link to page 23 at 4.5 Y position</a>)
string
link name
boolean
Indicates if the cell background must be painted (true) or transparent (false).
boolean
if true prints only the first line and return the remaining string.
array|null
array of RGB text color
string
font style (U, D, B, I)
boolean
if true the string is the starting of a line.
integer
the number of cells used or the remaining text if $firstline = true;
addHTMLTOC(integer|null $page = null,string $toc_name = 'TOC',array $templates = array(),boolean $correct_align = true,string $style = '',array $color = array(0, 0, 0))
This method must be called after all Bookmarks were set. Before calling this method you have to open the page using the addTOCPage() method. After calling this method you have to call endTOCPage() to close the TOC page.
public | |
---|---|
author | Nicola Asuni |
since | 5.0.001 (2010-05-06) |
see | \addTOCPage(), endTOCPage(), addTOC() |
integer|null
page number where this TOC should be inserted (leave empty for current page).
string
name to use for TOC bookmark.
array
array of html templates. Use: "#TOC_DESCRIPTION#" for bookmark title, "#TOC_PAGE_NUMBER#" for page number.
boolean
if true correct the number alignment (numbers must be in monospaced font like courier and right aligned on LTR, or left aligned on RTL)
string
Font style for title: B = Bold, I = Italic, BI = Bold + Italic.
array
RGB color array for title (values from 0 to 255).
addHTMLVertSpace(string $hbz,string $hb,boolean $cell = false,boolean $firsttag = false,boolean $lasttag = false)
protected | |
---|---|
string
Distance between current y and line bottom.
string
The height of the break.
boolean
if true add the default left (or right if RTL) padding to each new line (default false).
boolean
set to true when the tag is the first.
boolean
set to true when the tag is the last.
addJavascriptObject(string $script,boolean $onload = false): integer
public | |
---|---|
author | Nicola Asuni |
since | 4.8.000 (2009-09-07) |
string
Javascript code
boolean
if true executes this object when opening the document
integer
internal object ID
AddLink()
public | |
---|---|
since | 1.5 |
see | \Cell(), Write(), Image(), Link(), SetLink() |
AddPage(string $orientation = '',mixed $format = '',boolean $keepmargins = false,boolean $tocpage = false)
The origin of the coordinate system is at the top-left corner (or top-right for RTL) and increasing ordinates go downwards.
public | |
---|---|
since | 1.0 |
see | \startPage(), endPage(), addTOCPage(), endTOCPage(), getPageSizeFromFormat(), setPageFormat() |
string
page orientation. Possible values are (case insensitive):
mixed
The format used for pages. It can be either: one of the string values specified at getPageSizeFromFormat() or an array of parameters specified at setPageFormat().
boolean
if true overwrites the default page margins with the current margins
boolean
if true set the tocpage state to true (the added page will be used to display Table Of Content).
addPageRegion(array $region)
A no-write region is a portion of the page with a rectangular or trapezium shape that will not be covered when writing text or html code. A region is always aligned on the left or right side of the page ad is defined using a vertical segment. You can set multiple regions for the same page.
author | Nicola Asuni |
---|---|
public | |
since | 5.9.003 (2010-10-13) |
see | \setPageRegions(), getPageRegions() |
array
array of a single no-write region array: ('page' => page number or empy for current page, 'xt' => X top, 'yt' => Y top, 'xb' => X bottom, 'yb' => Y bottom, 'side' => page side 'L' = left or 'R' = right).
AddSpotColor(string $name,float $c,float $m,float $y,float $k)
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.
public | |
---|---|
since | 4.0.024 (2008-09-12) |
see | \SetDrawSpotColor(), SetFillSpotColor(), SetTextSpotColor() |
string
Full name of the spot color.
float
Cyan color for CMYK. Value between 0 and 100.
float
Magenta color for CMYK. Value between 0 and 100.
float
Yellow color for CMYK. Value between 0 and 100.
float
Key (Black) color for CMYK. Value between 0 and 100.
addTOC(integer|null $page = null,string $numbersfont = '',string $filler = '.',string $toc_name = 'TOC',string $style = '',array $color = array(0, 0, 0))
This method must be called after all Bookmarks were set. Before calling this method you have to open the page using the addTOCPage() method. After calling this method you have to call endTOCPage() to close the TOC page. You can override this method to achieve different styles.
public | |
---|---|
author | Nicola Asuni |
since | 4.5.000 (2009-01-02) |
see | \addTOCPage(), endTOCPage(), addHTMLTOC() |
integer|null
page number where this TOC should be inserted (leave empty for current page).
string
set the font for page numbers (please use monospaced font for better alignment).
string
string used to fill the space between text and page number.
string
name to use for TOC bookmark.
string
Font style for title: B = Bold, I = Italic, BI = Bold + Italic.
array
RGB color array for bookmark title (values from 0 to 255).
addTOCPage(string $orientation = '',mixed $format = '',boolean $keepmargins = false)
public | |
---|---|
since | 5.0.001 (2010-05-06) |
see | \AddPage(), startPage(), endPage(), endTOCPage() |
string
page orientation.
mixed
The format used for pages. It can be either: one of the string values specified at getPageSizeFromFormat() or an array of parameters specified at setPageFormat().
boolean
if true overwrites the default page margins with the current margins
adjustCellPadding(string|array|integer|boolean $brd): void|array
public | |
---|---|
since | 5.9.000 (2010-10-03) |
string|array|integer|boolean
Indicates if borders must be drawn around the cell. The value can be a number:
void|array
array of adjustments
Annotation(float $x,float $y,float $w,float $h,string $text,array $opt = array('Subtype' => 'Text'),integer $spaces)
!!!!THE ANNOTATION SUPPORT IS NOT YET FULLY IMPLEMENTED !!!!
public | |
---|---|
since | 4.0.018 (2008-08-06) |
float
Abscissa of the upper-left corner of the rectangle
float
Ordinate of the upper-left corner of the rectangle
float
Width of the rectangle
float
Height of the rectangle
string
annotation text or alternate content
array
array of options (see section 8.4 of PDF reference 1.7).
integer
number of spaces on the text to link
applyTSA(string $signature): string
protected | |
---|---|
author | Richard Stockinger |
since | 6.0.090 (2014-06-16) |
string
Digital signature as binary string
string
Timestamped digital signature
Arrow(float $x0,float $y0,float $x1,float $y1,integer $head_style,float $arm_size = 5,integer $arm_angle = 15)
author | Piotr Galecki, Nicola Asuni, Andy Meier |
---|---|
since | 4.6.018 (2009-07-10) |
float
Abscissa of first point.
float
Ordinate of first point.
float
Abscissa of second point.
float
Ordinate of second point.
integer
(0 = draw only arrowhead arms, 1 = draw closed arrowhead, but no fill, 2 = closed and filled arrowhead, 3 = filled arrowhead)
float
length of arrowhead arms
integer
angle between an arm and the shaft
Bookmark(string $txt,integer $level,float $y = -1,integer|string $page = '',string $style = '',array $color = array(0, 0, 0),float $x = -1,mixed $link = '')
public | |
---|---|
since | 2.1.002 (2008-02-12) |
string
Bookmark description.
integer
Bookmark level (minimum value is 0).
float
Y position in user units of the bookmark on the selected page (default = -1 = current position; 0 = page start;).
integer|string
Target page number (leave empty for current page). If you prefix a page number with the * character, then this page will not be changed when adding/deleting/moving pages.
string
Font style: B = Bold, I = Italic, BI = Bold + Italic.
array
RGB color array (values from 0 to 255).
float
X position in user units of the bookmark on the selected page (default = -1 = current position;).
mixed
URL, or numerical link ID, or named destination (# character followed by the destination name), or embedded file (* character followed by the file name).
Button(string $name,integer $w,integer $h,string $caption,mixed $action,array $prop = array(),array $opt = array(),float|null $x = null,float|null $y = null,boolean $js = false)
public | |
---|---|
author | Nicola Asuni |
since | 4.8.000 (2009-09-07) |
string
field name
integer
width
integer
height
string
caption.
mixed
action triggered by pressing the button. Use a string to specify a javascript action. Use an array to specify a form action options as on section 12.7.5 of PDF32000_2008.
array
javascript field properties. Possible values are described on official Javascript for Acrobat API reference.
array
annotation parameters. Possible values are described on official PDF32000_2008 reference.
float|null
Abscissa of the upper-left corner of the rectangle
float|null
Ordinate of the upper-left corner of the rectangle
boolean
if true put the field using JavaScript (requires Acrobat Writer to be rendered).
Cell(float $w,float $h,string $txt = '',mixed $border,integer $ln,string $align = '',boolean $fill = false,mixed $link = '',integer $stretch,boolean $ignore_min_height = false,string $calign = 'T',string $valign = 'M')
public | |
---|---|
since | 1.0 |
see | \SetFont(), SetDrawColor(), SetFillColor(), SetTextColor(), SetLineWidth(), AddLink(), Ln(), MultiCell(), Write(), SetAutoPageBreak() |
float
Cell width. If 0, the cell extends up to the right margin.
float
Cell height. Default value: 0.
string
String to print. Default value: empty string.
mixed
Indicates if borders must be drawn around the cell. The value can be a number:
integer
Indicates where the current position should go after the call. Possible values are:
string
Allows to center or align the text. Possible values are:
boolean
Indicates if the cell background must be painted (true) or transparent (false).
mixed
URL or identifier returned by AddLink().
integer
font stretch mode:
boolean
if true ignore automatic minimum height value.
string
cell vertical alignment relative to the specified Y value. Possible values are:
string
text vertical alignment inside the cell. Possible values are:
CheckBox(string $name,integer $w,boolean $checked = false,array $prop = array(),array $opt = array(),string $onvalue = 'Yes',float|null $x = null,float|null $y = null,boolean $js = false)
public | |
---|---|
author | Nicola Asuni |
since | 4.8.000 (2009-09-07) |
string
field name
integer
width
boolean
define the initial state.
array
javascript field properties. Possible values are described on official Javascript for Acrobat API reference.
array
annotation parameters. Possible values are described on official PDF32000_2008 reference.
string
value to be returned if selected.
float|null
Abscissa of the upper-left corner of the rectangle
float|null
Ordinate of the upper-left corner of the rectangle
boolean
if true put the field using JavaScript (requires Acrobat Writer to be rendered).
checkPageBreak(float $h,float|null $y = null,boolean $addpage = true): boolean
since | 3.2.000 (2008-07-01) |
---|---|
protected |
float
Cell height. Default value: 0.
float|null
starting y position, leave empty for current position.
boolean
if true add a page, otherwise only return the true/false state
boolean
true in case of page break, false otherwise.
checkPageRegions(float $h,float $x,float $y): array<mixed,float>
A no-write region is a portion of the page with a rectangular or trapezium shape that will not be covered when writing text or html code. A region is always aligned on the left or right side of the page ad is defined using a vertical segment.
author | Nicola Asuni |
---|---|
protected | |
since | 5.9.003 (2010-10-13) |
float
height of the text/image/object to print in user units
float
current X coordinate in user units
float
current Y coordinate in user units
array<mixed,float>
array($x, $y)
Circle(float $x0,float $y0,float $r,float $angstr,float $angend = 360,string $style = '',array $line_style = array(),array $fill_color = array(),integer $nc = 2)
A circle is formed from n Bezier curves.
public | |
---|---|
since | 2.1.000 (2008-01-08) |
float
Abscissa of center point.
float
Ordinate of center point.
float
Radius.
float
Angle start of draw line. Default value: 0.
float
Angle finish of draw line. Default value: 360.
string
Style of rendering. See the getPathPaintOperator() function for more information.
array
Line style of circle. Array like for SetLineStyle(). Default value: default line style (empty array).
array
Fill color. Format: array(red, green, blue). Default value: default color (empty array).
integer
Number of curves used to draw a 90 degrees portion of circle.
Clip(float $x,float $y,float $w,float $h)
author | Andreas W\FCrmser, Nicola Asuni |
---|---|
since | 3.1.000 (2008-06-09) |
protected | |
float
abscissa of the top left corner of the rectangle (or top right corner for RTL mode).
float
ordinate of the top left corner of the rectangle.
float
width of the rectangle.
float
height of the rectangle.
Close()
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.
public | |
---|---|
since | 1.0 |
see | \Open(), Output() |
closeHTMLTagHandler(array $dom,integer $key,boolean $cell,integer $maxbottomliney): array
protected |
---|
array
html dom array
integer
current element id
boolean
if true add the default left (or right if RTL) padding to each new line (default false).
integer
maximum y value of current line
array
$dom
colorRegistrationBar(float $x,float $y,float $w,float $h,boolean $transition = true,boolean $vertical = false,string $colors = 'A,R,G,B,C,M,Y,K')
author | Nicola Asuni |
---|---|
since | 4.9.000 (2010-03-26) |
public | |
float
abscissa of the top left corner of the rectangle.
float
ordinate of the top left corner of the rectangle.
float
width of the rectangle.
float
height of the rectangle.
boolean
if true prints tcolor transitions to white.
boolean
if true prints bar vertically.
string
colors to print separated by comma. Valid values are: A,W,R,G,B,C,M,Y,K,RGB,CMYK,ALL,ALLSPOT,
ComboBox(string $name,integer $w,integer $h,array $values,array $prop = array(),array $opt = array(),float|null $x = null,float|null $y = null,boolean $js = false)
public | |
---|---|
author | Nicola Asuni |
since | 4.8.000 (2009-09-07) |
string
field name
integer
width
integer
height
array
array containing the list of values.
array
javascript field properties. Possible values are described on official Javascript for Acrobat API reference.
array
annotation parameters. Possible values are described on official PDF32000_2008 reference.
float|null
Abscissa of the upper-left corner of the rectangle
float|null
Ordinate of the upper-left corner of the rectangle
boolean
if true put the field using JavaScript (requires Acrobat Writer to be rendered).
commitTransaction()
public | |
---|---|
since | 4.5.029 (2009-03-19) |
convertSVGtMatrix(array $tm): array
protected | |
---|---|
since | 5.0.000 (2010-05-02) |
array
original SVG transformation matrix
array
transformation matrix
CoonsPatchMesh(float $x,float $y,float $w,float $h,array $col1 = array(),array $col2 = array(),array $col3 = array(),array $col4 = array(),array $coords = array(0.0, 0.0, 0.33, 0.0, 0.67, 0.0, 1.0, 0.0, 1.0, 0.33, 1.0, 0.67, 1.0, 1.0, 0.67, 1.0, 0.33, 1.0, 0.0, 1.0, 0.0, 0.67, 0.0, 0.33),array $coords_min,array $coords_max = 1,boolean $antialias = false)
author | Andreas W\FCrmser, Nicola Asuni |
---|---|
since | 3.1.000 (2008-06-09) |
public | |
float
abscissa of the top left corner of the rectangle.
float
ordinate of the top left corner of the rectangle.
float
width of the rectangle.
float
height of the rectangle.
array
first color (lower left corner) (RGB components).
array
second color (lower right corner) (RGB components).
array
third color (upper right corner) (RGB components).
array
fourth color (upper left corner) (RGB components).
array
array
minimum value used by the coordinates. If a coordinate's value is smaller than this it will be cut to coords_min. default: 0
array
maximum value used by the coordinates. If a coordinate's value is greater than this it will be cut to coords_max. default: 1
boolean
A flag indicating whether to filter the shading function to prevent aliasing artifacts.
copyPage(integer $page): boolean
public | |
---|---|
since | 4.9.015 (2010-04-20) |
integer
number of page to copy (0 = current page)
boolean
true in case of success, false in case of error.
cropMark(float $x,float $y,float $w,float $h,string $type = 'T,R,B,L',array $color = array(100, 100, 100, 100, 'All'))
author | Nicola Asuni |
---|---|
since | 4.9.000 (2010-03-26) |
public | |
float
abscissa of the crop mark center.
float
ordinate of the crop mark center.
float
width of the crop mark.
float
height of the crop mark.
string
type of crop mark, one symbol per type separated by comma: T = TOP, F = BOTTOM, L = LEFT, R = RIGHT, TL = A = TOP-LEFT, TR = B = TOP-RIGHT, BL = C = BOTTOM-LEFT, BR = D = BOTTOM-RIGHT.
array
crop mark color (default spot registration color).
Curve(float $x0,float $y0,float $x1,float $y1,float $x2,float $y2,float $x3,float $y3,string $style = '',array $line_style = array(),array $fill_color = array())
The Bezier curve is a tangent to the line between the control points at either end of the curve.
public | |
---|---|
see | \SetLineStyle() |
since | 2.1.000 (2008-01-08) |
float
Abscissa of start point.
float
Ordinate of start point.
float
Abscissa of control point 1.
float
Ordinate of control point 1.
float
Abscissa of control point 2.
float
Ordinate of control point 2.
float
Abscissa of end point.
float
Ordinate of end point.
string
Style of rendering. See the getPathPaintOperator() function for more information.
array
Line style of curve. Array like for SetLineStyle(). Default value: default line style (empty array).
array
Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K) or array(C,M,Y,K,SpotColorName). Default value: default color (empty array).
deletePage(integer $page): boolean
public | |
---|---|
since | 4.6.004 (2009-04-23) |
integer
page to remove
boolean
true in case of success, false in case of error.
drawHTMLTagBorder(array $tag,integer $xmax)
protected | |
---|---|
since | 5.7.000 (2010-08-03) |
array
array of tag properties.
integer
end X coordinate for border.
Ellipse(float $x0,float $y0,float $rx,float $ry,float $angle,float $astart,float $afinish = 360,string $style = '',array $line_style = array(),array $fill_color = array(),integer $nc = 2)
An ellipse is formed from n Bezier curves.
author | Nicola Asuni |
---|---|
public | |
since | 2.1.000 (2008-01-08) |
float
Abscissa of center point.
float
Ordinate of center point.
float
Horizontal radius.
float
Vertical radius (if ry = 0 then is a circle, see Circle()). Default value: 0.
float
Angle oriented (anti-clockwise). Default value: 0.
float
Angle start of draw line. Default value: 0.
float
Angle finish of draw line. Default value: 360.
string
Style of rendering. See the getPathPaintOperator() function for more information.
array
Line style of ellipse. Array like for SetLineStyle(). Default value: default line style (empty array).
array
Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K) or array(C,M,Y,K,SpotColorName). Default value: default color (empty array).
integer
Number of curves used to draw a 90 degrees portion of ellipse.
endLayer()
public | |
---|---|
since | 5.9.102 (2011-07-13) |
endPage(boolean $tocpage = false)
public | |
---|---|
since | 4.2.010 (2008-11-14) |
see | \AddPage(), startPage(), addTOCPage(), endTOCPage() |
boolean
if true set the tocpage state to false (end the page used to display Table Of Content).
endSVGElementHandler(resource|string $parser,string $name)
author | Nicola Asuni |
---|---|
since | 5.0.000 (2010-05-02) |
protected | |
resource|string
The first parameter, parser, is a reference to the XML parser calling the handler.
string
The second parameter, name, contains the name of the element for which this handler is called. If case-folding is in effect for this parser, the element name will be in uppercase letters.
endTemplate(): string|false
An XObject Template is a PDF block that is a self-contained description of any sequence of graphics objects (including path objects, text objects, and sampled images). An XObject Template may be painted multiple times, either on several pages or at several locations on the same page and produces the same results each time, subject only to the graphics state at the time it is invoked.
author | Nicola Asuni |
---|---|
public | |
since | 5.8.017 (2010-08-24) |
see | \startTemplate(), printTemplate() |
string|false
the XObject Template ID in case of success or false in case of error.
endTOCPage()
public | |
---|---|
since | 5.0.001 (2010-05-06) |
see | \AddPage(), startPage(), endPage(), addTOCPage() |
Error(string $msg)
public | |
---|---|
since | 1.0 |
string
The error message
fileExists(string $file): boolean
string
boolean
fitBlock(float $w,float $h,float $x,float $y,boolean $fitonpage = false): array
protected | |
---|---|
since | 5.5.009 (2010-07-05) |
float
width
float
height
float
X coordinate
float
Y coodiante
boolean
if true the block is resized to not exceed page dimensions.
array
array($w, $h, $x, $y)
fixHTMLCode(string $html,string $default_css = '',array|null $tagvs = null,array|null $tidy_options = null): string
author | Nicola Asuni |
---|---|
public | |
since | 5.9.017 (2010-11-16) |
see | \TCPDF::setHtmlVSpace() |
string
htmlcode to fix
string
CSS commands to add
array|null
parameters for setHtmlVSpace method
array|null
options for tidy_parse_string function
string
XHTML code cleaned up
getAbsFontMeasure(integer $s): float
since | 5.9.186 (2012-09-13) |
---|
integer
Font measure.
float
Absolute measure.
GetAbsX(): float
public | |
---|---|
since | 1.2 |
see | \SetX(), GetY(), SetY() |
float
getAliasNbPages(): string
If the current font is unicode type, the returned string is surrounded by additional curly braces. This alias will be replaced by the total number of pages in the document.
since | 4.0.018 (2008-08-08) |
---|---|
public | |
string
getAliasNumPage(): string
If the current font is unicode type, the returned string is surrounded by additional curly braces. This alias will be replaced by the page number.
since | 4.5.000 (2009-01-02) |
---|---|
public | |
string
getAliasRightShift(): string
If the current font is unicode type, the returned string wil contain an additional open curly brace.
since | 5.9.099 (2011-06-27) |
---|---|
public | |
string
getAllInternalPageNumberAliases(): array
protected | |
---|---|
array
of page number aliases
getAllSpotColors(): array
public | |
---|---|
since | 6.0.038 (2013-09-30) |
array
Spot colors array.
getAlpha(): \array<string,bool|\string>
(Check the "Entries in a Graphics State Parameter Dictionary" on PDF 32000-1:2008).
public | |
---|---|
since | 5.9.152 (2012-03-23) |
\array
GetArrStringWidth(array $sa,string $fontname = '',string $fontstyle = '',float $fontsize,boolean $getarray = false): array<mixed,float>|float
author | Nicola Asuni |
---|---|
public | |
since | 2.4.000 (2008-03-06) |
array
The array of chars whose total length is to be computed
string
Family font. It can be either a name defined by AddFont() or one of the standard families. It is also possible to pass an empty string, in that case, the current family is retained.
string
Font style. Possible values are (case insensitive):
float
Font size in points. The default value is the current size.
boolean
if true returns an array of characters widths, if false returns the total length.
array<mixed,float>|float
total string length or array of characted widths
getAutoPageBreak(): boolean
public | |
---|---|
since | 5.9.088 |
boolean
auto-page-break mode
getBarcode(): string
public | |
---|---|
since | 4.0.012 (2008-07-24) |
string
getBorderStartPosition(): array
protected | |
---|---|
since | 5.7.000 (2010-08-03) |
array
containing top-left border coordinates
getBreakMargin(integer|null $pagenum = null): integer|float
author | Nicola Asuni |
---|---|
public | |
since | 1.5.2 |
see | \TCPDF::getPageDimensions() |
integer|null
page number (empty = current page)
integer|float
page break margin.
getBuffer(): string
protected | |
---|---|
since | 4.5.000 (2009-01-02) |
string
buffer content
getCachedFileContents(string $file): string
string
string
getCellBorder(float $x,float $y,float $w,float $h,string|array|integer $brd): string
protected | |
---|---|
see | \SetLineStyle() |
since | 5.7.000 (2010-08-02) |
float
X coordinate.
float
Y coordinate.
float
Cell width.
float
Cell height.
string|array|integer
Indicates if borders must be drawn around the cell. The value can be a number:
string
containing cell border code
getCellCode(float $w,float $h,string $txt = '',mixed $border,integer $ln,string $align = '',boolean $fill = false,mixed $link = '',integer $stretch,boolean $ignore_min_height = false,string $calign = 'T',string $valign = 'M'): string
protected | |
---|---|
since | 1.0 |
see | \TCPDF::Cell() |
float
Cell width. If 0, the cell extends up to the right margin.
float
Cell height. Default value: 0.
string
String to print. Default value: empty string.
mixed
Indicates if borders must be drawn around the cell. The value can be a number:
integer
Indicates where the current position should go after the call. Possible values are:
string
Allows to center or align the text. Possible values are:
boolean
Indicates if the cell background must be painted (true) or transparent (false).
mixed
URL or identifier returned by AddLink().
integer
font stretch mode:
boolean
if true ignore automatic minimum height value.
string
cell vertical alignment relative to the specified Y value. Possible values are:
string
text vertical alignment inside the cell. Possible values are:
string
containing cell code
getCellHeight(integer $fontsize,boolean $padding = TRUE): float
public |
---|
integer
Font size in internal units
boolean
If true add cell padding
float
getCellHeightRatio(): float
public | |
---|---|
since | 4.0.012 (2008-07-24) |
float
getCellMargins(): array
getCellPaddings(): array
public | |
---|---|
since | 5.9.000 (2010-10-03) |
see | \setCellPaddings(), SetCellPadding() |
array
of padding values
getCharBBox(integer $char): false|array
since | 5.9.186 (2012-09-13) |
---|
integer
Input character code.
false|array
array(xMin, yMin, xMax, yMax) or FALSE if not defined.
GetCharWidth(integer $char,boolean $notlast = true): float
author | Nicola Asuni |
---|---|
public | |
since | 2.4.000 (2008-03-06) |
integer
The char code whose length is to be returned
boolean
If false ignore the font-spacing.
float
char width
getColumn(): integer
public | |
---|---|
since | 5.5.011 (2010-07-08) |
integer
current column number
getCSSBorderDashStyle(string $style): integer
protected | |
---|---|
since | 5.7.000 (2010-08-02) |
string
border style to convert
integer
sash style (return -1 in case of none or hidden border)
getCSSBorderMargin(string $cssbspace,float $width): array
public | |
---|---|
since | 5.9.010 (2010-10-27) |
string
border-spacing CSS properties
float
width of the containing element
array
of border spacings
getCSSBorderStyle(string $cssborder): array
protected | |
---|---|
since | 5.7.000 (2010-08-02) |
string
border properties
array
containing border properties
getCSSBorderWidth(string $width): integer
protected | |
---|---|
since | 5.7.000 (2010-08-02) |
string
border width
integer
with in user units
getCSSFontSpacing(string $spacing,float $parent): float
protected | |
---|---|
since | 5.9.000 (2010-10-02) |
string
letter-spacing value
float
font spacing (tracking) value of the parent element
float
quantity to increases or decreases the space between characters in a text.
getCSSFontStretching(string $stretch,float $parent = 100): float
protected | |
---|---|
since | 5.9.000 (2010-10-02) |
string
stretch mode
float
stretch value of the parent element
float
font stretching percentage
getCSSMargin(string $cssmargin,float $width): array
public | |
---|---|
since | 5.9.000 (2010-10-04) |
string
margin properties
float
width of the containing element
array
of cell margins
getCSSPadding(string $csspadding,float $width): array
public | |
---|---|
since | 5.9.000 (2010-10-04) |
string
padding properties
float
width of the containing element
array
of cell paddings
getDestination(): array
public | |
---|---|
author | Nicola Asuni |
since | 5.9.097 (2011-06-23) |
array
Named Destination array.
getDocCreationTimestamp(): integer
public | |
---|---|
since | 5.9.152 (2012-03-23) |
integer
Creation timestamp in seconds.
getDocModificationTimestamp(): integer
public | |
---|---|
since | 5.9.152 (2012-03-23) |
integer
Modfication timestamp in seconds.
getFontAscent(string $font,string $style = '',float $size): integer
public | |
---|---|
author | Nicola Asuni |
since | 4.9.003 (2010-03-30) |
string
font name
string
font style
float
The size (in points)
integer
font ascent
getFontBBox(): array
public | |
---|---|
since | 5.9.152 (2012-03-23) |
array
getFontBuffer(string $font): string|false
protected | |
---|---|
since | 4.5.000 (2009-01-02) |
string
font key
string|false
font buffer content or false in case of error
getFontDescent(string $font,string $style = '',float $size): integer
public | |
---|---|
author | Nicola Asuni |
since | 4.9.003 (2010-03-30) |
string
font name
string
font style
float
The size (in points)
integer
font descent
getFontFamily(): string
public | |
---|---|
since | 4.3.008 (2008-12-05) |
string
current font family name
getFontFamilyName(string $fontfamily): string
author | Nicola Asuni |
---|---|
public | |
since | 5.8.004 (2010-08-17) |
string
property string containing font family names
string
normalized font name
getFontSize(): float
public | |
---|---|
since | 3.2.000 (2008-06-23) |
float
current font size
getFontSizePt(): integer
public | |
---|---|
since | 3.2.000 (2008-06-23) |
integer
current font size in points unit
getFontsList()
protected | |
---|---|
since | 4.0.013 (2008-07-28) |
getFontSpacing(): integer
author | Nicola Asuni |
---|---|
public | |
since | 5.9.000 (2010-09-29) |
integer
font spacing (tracking) value
getFontStretching(): float
author | Nicola Asuni |
---|---|
public | |
since | 5.9.000 (2010-09-29) |
float
stretching value
getFontStyle(): string
public | |
---|---|
since | 4.3.008 (2008-12-05) |
string
current font style
getFontSubsetting(): boolean
author | Nicola Asuni |
---|---|
public | |
since | 5.3.002 (2010-06-07) |
boolean
default font subsetting state.
getFormDefaultProp(): array
public | |
---|---|
author | Nicola Asuni |
since | 4.8.000 (2009-09-06) |
array
$prop javascript field properties. Possible values are described on official Javascript for Acrobat API reference.
getGDgamma(resource $img,integer $c)
protected | |
---|---|
since | 4.3.007 (2008-12-04) |
resource
GD image Resource ID.
integer
alpha color
getGraphicVars(): array
protected | |
---|---|
since | 4.2.010 (2008-11-14) |
array
of graphic variables
getGroupPageNo(): integer
public | |
---|---|
since | 3.0.000 (2008-03-27) |
integer
current page in the group
getGroupPageNoFormatted()
public | |
---|---|
since | 4.3.003 (2008-11-18) |
see | \PaneNo(), formatPageNumber() |
getHashForTCPDFtagParams(string $data): string
public | static |
---|
string
serialized data
string
getHeaderData(): \array<string,mixed>
public | |
---|---|
since | 4.0.012 (2008-07-24) |
\array
getHeaderFont(): \array<int,string|float|\null>
phpstan-return | array{0: string, 1: string, 2: float|null} |
---|---|
public | |
since | 4.0.012 (2008-07-24) |
\array
Array describing the basic font parameters: (family, style, size).
getHeaderMargin(): float
since | 4.0.012 (2008-07-24) |
---|---|
public | |
float
getHtmlDomArray(string $html): array
protected | |
---|---|
since | 3.2.000 (2008-06-20) |
string
html code
array
getHTMLFontUnits(string $val,float $refsize = 12,float $parent_size = 12,string $defaultunit = 'pt'): float
public |
---|
string
String containing font size value and unit.
float
Reference font size in points.
float
Parent font size in points.
string
Default unit (can be one of the following: %, em, ex, px, in, mm, pc, pt).
float
value in points
getHTMLUnitToUnits(string $htmlval,string $refsize = 1,string $defaultunit = 'px',boolean $points = false): float
public | |
---|---|
since | 4.4.004 (2008-12-10) |
string
String containing values and unit.
string
Reference value in points.
string
Default unit (can be one of the following: %, em, ex, px, in, mm, pc, pt).
boolean
If true returns points, otherwise returns value in user's units.
float
value in user's unit or point if $points=true
getImageBuffer(string $image): string|false
protected | |
---|---|
since | 4.5.000 (2008-12-31) |
string
image key
string|false
image buffer content or false in case of error
getImageRBX(): float
public | |
---|---|
float
getImageRBY(): float
public | |
---|---|
float
getImageScale(): float
author | Nicola Asuni |
---|---|
public | |
since | 1.5.2 |
float
adjusting factor to convert pixels to user units.
getInternalPageNumberAliases(string $a = ''): array
protected |
---|
string
Base alias.
array
of page number aliases
getLastH(): float
public | |
---|---|
since | 4.0.017 (2008-08-05) |
float
last cell height
GetLineWidth(): integer
public | |
---|---|
since | 2.1.000 (2008-01-07) |
see | \Line(), SetLineWidth() |
integer
Line width
getMargins(): array
public | |
---|---|
since | 3.2.000 (2008-06-23) |
array
containing all margins measures
getNumberOfColumns(): integer
public | |
---|---|
since | 5.8.018 (2010-08-25) |
integer
number of columns
GetNumChars(string $s): integer
public | |
---|---|
since | 2.0.0001 (2008-01-07) |
string
The input string.
integer
number of characters
getNumLines(string $txt,float $w,boolean $reseth = false,boolean $autopadding = true,array|null $cellpadding = null,mixed $border): float
author | Alexander Escalona Fern\E1ndez, Nicola Asuni |
---|---|
public | |
since | 4.5.011 |
string
String for calculating his height
float
Width of cells. If 0, they extend up to the right margin of the page.
boolean
if true reset the last cell height (default false).
boolean
if true, uses internal padding and automatically adjust it to account for line width (default true).
array|null
Internal cell padding, if empty uses default cell padding.
mixed
Indicates if borders must be drawn around the cell. The value can be a number:
float
Return the minimal height needed for multicell method for printing the $txt param.
getNumPages(): integer
public | |
---|---|
since | 2.1.000 (2008-01-07) |
see | \setPage(), getPage(), lastpage() |
integer
number of pages
getOriginalMargins(): array
public | |
---|---|
since | 4.0.012 (2008-07-24) |
array
containing all margins measures
getOverprint(): \array<string,bool|\int>
(Check the "Entries in a Graphics State Parameter Dictionary" on PDF 32000-1:2008).
public | |
---|---|
since | 5.9.152 (2012-03-23) |
\array
getPage(): integer
public | |
---|---|
since | 2.1.000 (2008-01-07) |
see | \setPage(), lastpage(), getNumPages() |
integer
page number
getPageBuffer(integer $page): string
protected | |
---|---|
since | 4.5.000 (2008-12-31) |
integer
page number
string
page buffer content or false in case of error
getPageDimensions(integer|null $pagenum = null): array
author | Nicola Asuni |
---|---|
public | |
since | 4.5.027 (2009-03-16) |
integer|null
page number (empty = current page)
array
of page dimensions.
getPageGroupAlias(): string
If the current font is unicode type, the returned string is surrounded by additional curly braces. This alias will be replaced by the total number of pages in this group.
public | |
---|---|
since | 3.0.000 (2008-03-27) |
string
alias of the current page group
getPageHeight(integer|null $pagenum = null): integer|float
author | Nicola Asuni |
---|---|
public | |
since | 1.5.2 |
see | \TCPDF::getPageDimensions() |
integer|null
page number (empty = current page)
integer|float
page height.
getPageNumGroupAlias(): string
If the current font is unicode type, the returned string is surrounded by additional curly braces. This alias will be replaced by the page number (relative to the belonging group).
public | |
---|---|
since | 4.5.000 (2009-01-02) |
string
alias of the current page group
getPageRegions(): array
author | Nicola Asuni |
---|---|
public | |
since | 5.9.003 (2010-10-13) |
see | \setPageRegions(), addPageRegion() |
array
of no-write page regions
getPageWidth(integer|null $pagenum = null): integer|float
author | Nicola Asuni |
---|---|
public | |
since | 1.5.2 |
see | \TCPDF::getPageDimensions() |
integer|null
page number (empty = current page)
integer|float
page width.
getPDFData()
public | |
---|---|
getRawCharWidth(integer $char): float
author | Nicola Asuni |
---|---|
public | |
since | 5.9.000 (2010-09-28) |
integer
The char code whose length is to be returned
float
char width
getRemainingWidth(): float
protected | |
---|---|
float
Return the remaining width
getRTL(): boolean
public | |
---|---|
since | 4.0.012 (2008-07-24) |
boolean
getScaleFactor(): integer
author | Nicola Asuni |
---|---|
public | |
since | 1.5.2 |
integer
scale factor.
getSignatureAppearanceArray(float $x,float $y,float $w,float $h,integer $page = -1,string $name = ''): array
protected | |
---|---|
author | Nicola Asuni |
since | 5.9.101 (2011-07-06) |
float
Abscissa of the upper-left corner.
float
Ordinate of the upper-left corner.
float
Width of the signature area.
float
Height of the signature area.
integer
option page number (if < 0 the current page is used).
string
Name of the signature.
array
Array defining page and rectangle coordinates of signature appearance.
getSpaceString(): string
protected | |
---|---|
author | Nicola Asuni |
since | 4.8.024 (2010-01-15) |
string
getStringHeight(float $w,string $txt,boolean $reseth = false,boolean $autopadding = true,array|null $cellpadding = null,mixed $border): float
Generally, if you want to know the exact height for a block of content you can use the following alternative technique:
pre | // store current object $pdf->startTransaction(); // store starting values $start_y = $pdf->GetY(); $start_page = $pdf->getPage(); // call your printing functions with your parameters // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $pdf->MultiCell($w=0, $h=0, $txt, $border=1, $align='L', $fill=false, $ln=1, $x=null, $y=null, $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0); // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // get the new Y $end_y = $pdf->GetY(); $end_page = $pdf->getPage(); // calculate height $height = 0; if ($end_page == $start_page) { $height = $end_y - $start_y; } else { for ($page=$start_page; $page <= $end_page; ++$page) { $this->setPage($page); if ($page == $start_page) { // first page $height += $this->h - $start_y - $this->bMargin; } elseif ($page == $end_page) { // last page $height += $end_y - $this->tMargin; } else { $height += $this->h - $this->tMargin - $this->bMargin; } } } // restore previous object $pdf = $pdf->rollbackTransaction(); |
---|---|
author | Nicola Asuni, Alexander Escalona Fern\E1ndez |
public |
float
Width of cells. If 0, they extend up to the right margin of the page.
string
String for calculating his height
boolean
if true reset the last cell height (default false).
boolean
if true, uses internal padding and automatically adjust it to account for line width (default true).
array|null
Internal cell padding, if empty uses default cell padding.
mixed
Indicates if borders must be drawn around the cell. The value can be a number:
float
Return the minimal height needed for multicell method for printing the $txt param.
GetStringWidth(string $s,string $fontname = '',string $fontstyle = '',float $fontsize,boolean $getarray = false): array<mixed,float>|float
author | Nicola Asuni |
---|---|
public | |
since | 1.2 |
string
The string whose length is to be computed
string
Family font. It can be either a name defined by AddFont() or one of the standard families. It is also possible to pass an empty string, in that case, the current family is retained.
string
Font style. Possible values are (case insensitive):
float
Font size in points. The default value is the current size.
boolean
if true returns an array of characters widths, if false returns the total length.
array<mixed,float>|float
total string length or array of characted widths
getTextShadow(): array
since | 5.9.174 (2012-07-25) |
---|---|
public | |
array
array of parameters.
GetX(): float
The value is relative to the left border for LTR languages and to the right border for RTL languages.
public | |
---|---|
since | 1.2 |
see | \SetX(), GetY(), SetY() |
float
GetY(): float
public | |
---|---|
since | 1.0 |
see | \SetY(), GetX(), SetX() |
float
Gradient(integer $type,array $coords,array $stops,array $background = array(),boolean $antialias = false)
author | Nicola Asuni |
---|---|
since | 3.1.000 (2008-06-09) |
public | |
integer
type of gradient (1 Function-based shading; 2 Axial shading; 3 Radial shading; 4 Free-form Gouraud-shaded triangle mesh; 5 Lattice-form Gouraud-shaded triangle mesh; 6 Coons patch mesh; 7 Tensor-product patch mesh). (Not all types are currently supported)
array
array of coordinates.
array
array gradient color components: color = array of GRAY, RGB or CMYK color components; offset = (0 to 1) represents a location along the gradient vector; exponent = exponent of the exponential interpolation function (default = 1).
array
An array of colour components appropriate to the colour space, specifying a single background colour value.
boolean
A flag indicating whether to filter the shading function to prevent aliasing artifacts.
Header()
It is automatically called by AddPage() and could be overwritten in your own inherited class.
public | |
---|---|
hyphenateText(string $text,mixed $patterns,array $dictionary = array(),integer $leftmin = 1,integer $rightmin = 2,integer $charmin = 1,integer $charmax = 8): string
author | Nicola Asuni |
---|---|
since | 4.9.012 (2010-04-12) |
public |
string
text to process
mixed
Array of hypenation patterns or a TEX file containing hypenation patterns. TEX patterns can be downloaded from http://www.ctan.org/tex-archive/language/hyph-utf8/tex/generic/hyph-utf8/patterns/
array
Array of words to be returned without applying the hyphenation algorithm.
integer
Minimum number of character to leave on the left of the word without applying the hyphens.
integer
Minimum number of character to leave on the right of the word without applying the hyphens.
integer
Minimum word length to apply the hyphenation algorithm.
integer
Maximum length of broken piece of word.
string
text with soft hyphens
hyphenateWord(array $word,array $patterns,array $dictionary = array(),integer $leftmin = 1,integer $rightmin = 2,integer $charmin = 1,integer $charmax = 8): array
author | Nicola Asuni |
---|---|
since | 4.9.012 (2010-04-12) |
protected |
array
array of chars
array
Array of hypenation patterns.
array
Array of words to be returned without applying the hyphenation algorithm.
integer
Minimum number of character to leave on the left of the word without applying the hyphens.
integer
Minimum number of character to leave on the right of the word without applying the hyphens.
integer
Minimum word length to apply the hyphenation algorithm.
integer
Maximum length of broken piece of word.
array
text with soft hyphens
Image(string $file,float|null $x = null,float|null $y = null,float $w,float $h,string $type = '',mixed $link = '',string $align = '',mixed $resize = false,integer $dpi = 300,string $palign = '',boolean $ismask = false,mixed $imgmask = false,mixed $border,mixed $fitbox = false,boolean $hidden = false,boolean $fitonpage = false,boolean $alt = false,array $altimgs = array()): mixed|false
The upper-left corner must be given. The dimensions can be specified in different ways:
public | |
---|---|
since | 1.1 |
string
Name of the file containing the image or a '@' character followed by the image data string. To link an image without embedding it on the document, set an asterisk character before the URL (i.e.: '*http://www.example.com/image.jpg').
float|null
Abscissa of the upper-left corner (LTR) or upper-right corner (RTL).
float|null
Ordinate of the upper-left corner (LTR) or upper-right corner (RTL).
float
Width of the image in the page. If not specified or equal to zero, it is automatically calculated.
float
Height of the image in the page. If not specified or equal to zero, it is automatically calculated.
string
Image format. Possible values are (case insensitive): JPEG and PNG (whitout GD library) and all images supported by GD: GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM;. If not specified, the type is inferred from the file extension.
mixed
URL or identifier returned by AddLink().
string
Indicates the alignment of the pointer next to image insertion relative to image height. The value can be:
mixed
If true resize (reduce) the image to fit $w and $h (requires GD or ImageMagick library); if false do not resize; if 2 force resize in all cases (upscaling and downscaling).
integer
dot-per-inch resolution used on resize
string
Allows to center or align the image on the current line. Possible values are:
boolean
true if this image is a mask, false otherwise
mixed
image object returned by this function or false
mixed
Indicates if borders must be drawn around the cell. The value can be a number:
mixed
If not false scale image dimensions proportionally to fit within the ($w, $h) box. $fitbox can be true or a 2 characters string indicating the image alignment inside the box. The first character indicate the horizontal alignment (L = left, C = center, R = right) the second character indicate the vertical algnment (T = top, M = middle, B = bottom).
boolean
If true do not display the image.
boolean
If true the image is resized to not exceed page dimensions.
boolean
If true the image will be added as alternative and not directly printed (the ID of the image will be returned).
array
Array of alternate images IDs. Each alternative image must be an array with two values: an integer representing the image ID (the value returned by the Image method) and a boolean value to indicate if the image is the default for printing.
mixed|false
image information
ImageEps(string $file,float|null $x = null,float|null $y = null,float $w,float $h,mixed $link = '',boolean $useBoundingBox = true,string $align = '',string $palign = '',mixed $border,boolean $fitonpage = false,boolean $fixoutvals = false)
NOTE: EPS is not yet fully implemented, use the setRasterizeVectorImages() method to enable/disable rasterization of vector images using ImageMagick library. Only vector drawing is supported, not text or bitmap. Although the script was successfully tested with various AI format versions, best results are probably achieved with files that were exported in the AI3 format (tested with Illustrator CS2, Freehand MX and Photoshop CS2).
author | Valentin Schmidt, Nicola Asuni |
---|---|
since | 3.1.000 (2008-06-09) |
public | |
string
Name of the file containing the image or a '@' character followed by the EPS/AI data string.
float|null
Abscissa of the upper-left corner.
float|null
Ordinate of the upper-left corner.
float
Width of the image in the page. If not specified or equal to zero, it is automatically calculated.
float
Height of the image in the page. If not specified or equal to zero, it is automatically calculated.
mixed
URL or identifier returned by AddLink().
boolean
specifies whether to position the bounding box (true) or the complete canvas (false) at location (x,y). Default value is true.
string
Indicates the alignment of the pointer next to image insertion relative to image height. The value can be:
string
Allows to center or align the image on the current line. Possible values are:
mixed
Indicates if borders must be drawn around the cell. The value can be a number:
boolean
if true the image is resized to not exceed page dimensions.
boolean
if true remove values outside the bounding box.
ImagePngAlpha(string $file,float $x,float $y,float $wpx,float $hpx,float $w,float $h,string $type,mixed $link,string $align,boolean $resize,integer $dpi,string $palign,string $filehash = '')
author | Nicola Asuni |
---|---|
protected | |
since | 4.3.007 (2008-12-04) |
see | \TCPDF::Image() |
string
Name of the file containing the image.
float
Abscissa of the upper-left corner.
float
Ordinate of the upper-left corner.
float
Original width of the image in pixels.
float
original height of the image in pixels.
float
Width of the image in the page. If not specified or equal to zero, it is automatically calculated.
float
Height of the image in the page. If not specified or equal to zero, it is automatically calculated.
string
Image format. Possible values are (case insensitive): JPEG and PNG (whitout GD library) and all images supported by GD: GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM;. If not specified, the type is inferred from the file extension.
mixed
URL or identifier returned by AddLink().
string
Indicates the alignment of the pointer next to image insertion relative to image height. The value can be:
boolean
If true resize (reduce) the image to fit $w and $h (requires GD library).
integer
dot-per-inch resolution used on resize
string
Allows to center or align the image on the current line. Possible values are:
string
File hash used to build unique file names.
ImageSVG(string $file,float|null $x = null,float|null $y = null,float $w,float $h,mixed $link = '',string $align = '',string $palign = '',mixed $border,boolean $fitonpage = false)
NOTE: SVG standard is not yet fully implemented, use the setRasterizeVectorImages() method to enable/disable rasterization of vector images using ImageMagick library.
author | Nicola Asuni |
---|---|
since | 5.0.000 (2010-05-02) |
public | |
string
Name of the SVG file or a '@' character followed by the SVG data string.
float|null
Abscissa of the upper-left corner.
float|null
Ordinate of the upper-left corner.
float
Width of the image in the page. If not specified or equal to zero, it is automatically calculated.
float
Height of the image in the page. If not specified or equal to zero, it is automatically calculated.
mixed
URL or identifier returned by AddLink().
string
Indicates the alignment of the pointer next to image insertion relative to image height. The value can be:
string
Allows to center or align the image on the current line. Possible values are:
mixed
Indicates if borders must be drawn around the cell. The value can be a number:
boolean
if true the image is resized to not exceed page dimensions.
importPDF(string $filename): true
public | |
---|---|
since | 1.0.000 (2011-05-24) |
string
Filename of the PDF document to import.
true
in case of success, false otherwise
IncludeJS(string $script)
public | |
---|---|
author | Johannes G\FCntert, Nicola Asuni |
since | 2.1.002 (2008-02-12) |
string
Javascript code
inPageBody(): boolean
protected | |
---|---|
since | 5.9.091 (2011-06-15) |
boolean
true if we are not in page header nor in page footer, false otherwise.
isCharDefined(mixed $char,string $font = '',string $style = ''): boolean
public | |
---|---|
since | 5.9.153 (2012-03-28) |
mixed
Character to check (integer value or string)
string
Font name (family name).
string
Font style.
boolean
true if the char is defined, false otherwise.
isRTLTextDir(): boolean
public | |
---|---|
since | 4.8.014 (2009-11-04) |
boolean
isUnicodeFont(): boolean
author | Nicola Asuni |
---|---|
public | |
since | 5.8.002 (2010-08-14) |
boolean
true for unicode font, false otherwise.
lastPage(boolean $resetmargins = false)
public | |
---|---|
since | 2.0.000 (2008-01-04) |
see | \setPage(), getPage(), getNumPages() |
boolean
if true reset left, right, top margins and Y position.
Line(float $x1,float $y1,float $x2,float $y2,array $style = array())
public | |
---|---|
since | 1.0 |
see | \SetLineWidth(), SetDrawColor(), SetLineStyle() |
float
Abscissa of first point.
float
Ordinate of first point.
float
Abscissa of second point.
float
Ordinate of second point.
array
Line style. Array like for SetLineStyle(). Default value: default line style (empty array).
LinearGradient(float $x,float $y,float $w,float $h,array $col1 = array(),array $col2 = array(),array $coords = array(0, 0, 1, 0))
author | Andreas W\FCrmser, Nicola Asuni |
---|---|
since | 3.1.000 (2008-06-09) |
public | |
float
abscissa of the top left corner of the rectangle.
float
ordinate of the top left corner of the rectangle.
float
width of the rectangle.
float
height of the rectangle.
array
first color (Grayscale, RGB or CMYK components).
array
second color (Grayscale, RGB or CMYK components).
array
array of the form (x1, y1, x2, y2) which defines the gradient vector (see linear_gradient_coords.jpg). The default value is from left to right (x1=0, y1=0, x2=1, y2=0).
Link(float $x,float $y,float $w,float $h,mixed $link,integer $spaces)
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.
public | |
---|---|
since | 1.5 |
see | \AddLink(), Annotation(), Cell(), Write(), Image() |
float
Abscissa of the upper-left corner of the rectangle
float
Ordinate of the upper-left corner of the rectangle
float
Width of the rectangle
float
Height of the rectangle
mixed
URL or identifier returned by AddLink()
integer
number of spaces on the text to link
ListBox(string $name,integer $w,integer $h,array $values,array $prop = array(),array $opt = array(),float|null $x = null,float|null $y = null,boolean $js = false)
public | |
---|---|
author | Nicola Asuni |
since | 4.8.000 (2009-09-07) |
string
field name
integer
width
integer
height
array
array containing the list of values.
array
javascript field properties. Possible values are described on official Javascript for Acrobat API reference.
array
annotation parameters. Possible values are described on official PDF32000_2008 reference.
float|null
Abscissa of the upper-left corner of the rectangle
float|null
Ordinate of the upper-left corner of the rectangle
boolean
if true put the field using JavaScript (requires Acrobat Writer to be rendered).
Ln(float|null $h = null,boolean $cell = false)
The current abscissa goes back to the left margin and the ordinate increases by the amount passed in parameter.
public | |
---|---|
since | 1.0 |
see | \TCPDF::Cell() |
float|null
The height of the break. By default, the value equals the height of the last printed cell.
boolean
if true add the current left (or right o for RTL) padding to the X coordinate
MirrorH(float|null $x = null)
public | |
---|---|
since | 2.1.000 (2008-01-07) |
see | \StartTransform(), StopTransform() |
float|null
abscissa of the point. Default is current x position
MirrorL(float $angle,float|null $x = null,float|null $y = null)
public | |
---|---|
since | 2.1.000 (2008-01-07) |
see | \StartTransform(), StopTransform() |
float
gradient angle of the straight line. Default is 0 (horizontal line).
float|null
abscissa of the point. Default is current x position
float|null
ordinate of the point. Default is current y position
MirrorP(float|null $x = null,float|null $y = null)
public | |
---|---|
since | 2.1.000 (2008-01-07) |
see | \StartTransform(), StopTransform() |
float|null
abscissa of the point. Default is current x position
float|null
ordinate of the point. Default is current y position
MirrorV(float|null $y = null)
public | |
---|---|
since | 2.1.000 (2008-01-07) |
see | \StartTransform(), StopTransform() |
float|null
ordinate of the point. Default is current y position
movePage(integer $frompage,integer $topage): boolean
public | |
---|---|
since | 4.5.000 (2009-01-02) |
integer
number of the source page
integer
number of the destination page (must be less than $frompage)
boolean
true in case of success, false in case of error.
MultiCell(float $w,float $h,string $txt,mixed $border,string $align = 'J',boolean $fill = false,integer $ln = 1,float|null $x = null,float|null $y = null,boolean $reseth = true,integer $stretch,boolean $ishtml = false,boolean $autopadding = true,float $maxh,string $valign = 'T',boolean $fitcell = false): integer
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.
public | |
---|---|
since | 1.3 |
see | \SetFont(), SetDrawColor(), SetFillColor(), SetTextColor(), SetLineWidth(), Cell(), Write(), SetAutoPageBreak() |
float
Width of cells. If 0, they extend up to the right margin of the page.
float
Cell minimum height. The cell extends automatically if needed.
string
String to print
mixed
Indicates if borders must be drawn around the cell. The value can be a number:
string
Allows to center or align the text. Possible values are:
boolean
Indicates if the cell background must be painted (true) or transparent (false).
integer
Indicates where the current position should go after the call. Possible values are:
float|null
x position in user units
float|null
y position in user units
boolean
if true reset the last cell height (default true).
integer
font stretch mode:
boolean
INTERNAL USE ONLY -- set to true if $txt is HTML content (default = false). Never set this parameter to true, use instead writeHTMLCell() or writeHTML() methods.
boolean
if true, uses internal padding and automatically adjust it to account for line width.
float
maximum height. It should be >= $h and less then remaining space to the bottom of the page, or 0 for disable this feature. This feature works only when $ishtml=false.
string
Vertical alignment of text (requires $maxh = $h > 0). Possible values are:
boolean
if true attempt to fit all the text within the cell by reducing the font size (do not work in HTML mode). $maxh must be greater than 0 and equal to $h.
integer
Return the number of cells or 1 for html mode.
Open()
It is not necessary to call it explicitly because AddPage() does it automatically. Note: no page is created by this method
public | |
---|---|
since | 1.0 |
see | \AddPage(), Close() |
openHTMLTagHandler(array $dom,integer $key,boolean $cell): array
protected |
---|
array
html dom array
integer
current element id
boolean
if true add the default left (or right if RTL) padding to each new line (default false).
array
$dom
Output(string $name = 'doc.pdf',string $dest = 'I'): string
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.
public | |
---|---|
since | 1.0 |
see | \TCPDF::Close() |
string
The name of the file when saved. Note that special characters are removed and blanks characters are replaced with the underscore character.
string
Destination where to send the document. It can take one of the following values:
string
PageNo(): integer
PageNoFormatted()
public | |
---|---|
since | 4.2.005 (2008-11-06) |
see | \PaneNo(), formatPageNumber() |
PieSector(float $xc,float $yc,float $r,float $a,float $b,string $style = 'FD',float $cw = true,float $o = 90)
It can be used for instance to render pie charts.
author | Maxime Delorme, Nicola Asuni |
---|---|
since | 3.1.000 (2008-06-09) |
public | |
float
abscissa of the center.
float
ordinate of the center.
float
radius.
float
start angle (in degrees).
float
end angle (in degrees).
string
Style of rendering. See the getPathPaintOperator() function for more information.
float
indicates whether to go clockwise (default: true).
float
origin of angles (0 for 3 o'clock, 90 for noon, 180 for 9 o'clock, 270 for 6 o'clock). Default: 90.
PieSectorXY(float $xc,float $yc,float $rx,float $ry,float $a,float $b,string $style = 'FD',float $cw = false,float $o,integer $nc = 2)
It can be used for instance to render pie charts.
author | Maxime Delorme, Nicola Asuni |
---|---|
since | 3.1.000 (2008-06-09) |
public | |
float
abscissa of the center.
float
ordinate of the center.
float
the x-axis radius.
float
the y-axis radius.
float
start angle (in degrees).
float
end angle (in degrees).
string
Style of rendering. See the getPathPaintOperator() function for more information.
float
indicates whether to go clockwise.
float
origin of angles (0 for 3 o'clock, 90 for noon, 180 for 9 o'clock, 270 for 6 o'clock).
integer
Number of curves used to draw a 90 degrees portion of arc.
pixelsToUnits(integer $px): float
public | |
---|---|
see | \setImageScale(), getImageScale() |
integer
pixels
float
value in user's unit
Polycurve(float $x0,float $y0,array<mixed,float> $segments,string $style = '',array $line_style = array(),array $fill_color = array())
Each Bezier curve segment is a tangent to the line between the control points at either end of the curve.
public | |
---|---|
see | \SetLineStyle() |
since | 3.0008 (2008-05-12) |
float
Abscissa of start point.
float
Ordinate of start point.
array<mixed,float>
An array of bezier descriptions. Format: array(x1, y1, x2, y2, x3, y3).
string
Style of rendering. See the getPathPaintOperator() function for more information.
array
Line style of curve. Array like for SetLineStyle(). Default value: default line style (empty array).
array
Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K) or array(C,M,Y,K,SpotColorName). Default value: default color (empty array).
Polygon(array $p,string $style = '',array $line_style = array(),array $fill_color = array(),boolean $closed = true)
public | |
---|---|
since | 2.1.000 (2008-01-08) |
array
Points 0 to ($np - 1). Array with values (x0, y0, x1, y1,..., x(np-1), y(np - 1))
string
Style of rendering. See the getPathPaintOperator() function for more information.
array
Line style of polygon. Array with keys among the following:
If a key is not present or is null, not draws the line. Default value is default line style (empty array).
array
Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K) or array(C,M,Y,K,SpotColorName). Default value: default color (empty array).
boolean
if true the polygon is closes, otherwise will remain open
PolyLine(array $p,string $style = '',array $line_style = array(),array $fill_color = array())
since | 4.8.003 (2009-09-15) |
---|---|
public | |
array
Points 0 to ($np - 1). Array with values (x0, y0, x1, y1,..., x(np-1), y(np - 1))
string
Style of rendering. See the getPathPaintOperator() function for more information.
array
Line style of polygon. Array with keys among the following:
If a key is not present or is null, not draws the line. Default value is default line style (empty array).
array
Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K) or array(C,M,Y,K,SpotColorName). Default value: default color (empty array).
printTemplate(string $id,float|null $x = null,float|null $y = null,float $w,float $h,string $align = '',string $palign = '',boolean $fitonpage = false)
You can print an XObject Template inside the currently opened Template. An XObject Template is a PDF block that is a self-contained description of any sequence of graphics objects (including path objects, text objects, and sampled images). An XObject Template may be painted multiple times, either on several pages or at several locations on the same page and produces the same results each time, subject only to the graphics state at the time it is invoked.
author | Nicola Asuni |
---|---|
public | |
since | 5.8.017 (2010-08-24) |
see | \startTemplate(), endTemplate() |
string
The ID of XObject Template to print.
float|null
X position in user units (empty string = current x position)
float|null
Y position in user units (empty string = current y position)
float
Width in user units (zero = remaining page width)
float
Height in user units (zero = remaining page height)
string
Indicates the alignment of the pointer next to template insertion relative to template height. The value can be:
string
Allows to center or align the template on the current line. Possible values are:
boolean
If true the template is resized to not exceed page dimensions.
putHtmlListBullet(integer $listdepth,string $listtype = '',float $size = 10)
protected | |
---|---|
since | 4.4.004 (2008-12-10) |
integer
list nesting level
string
type of list
float
current font size
RadialGradient(float $x,float $y,float $w,float $h,array $col1 = array(),array $col2 = array(),array $coords = array(0.5, 0.5, 0.5, 0.5, 1))
author | Andreas W\FCrmser, Nicola Asuni |
---|---|
since | 3.1.000 (2008-06-09) |
public | |
float
abscissa of the top left corner of the rectangle.
float
ordinate of the top left corner of the rectangle.
float
width of the rectangle.
float
height of the rectangle.
array
first color (Grayscale, RGB or CMYK components).
array
second color (Grayscale, RGB or CMYK components).
array
array of the form (fx, fy, cx, cy, r) where (fx, fy) is the starting point of the gradient with color1, (cx, cy) is the center of the circle with color2, and r is the radius of the circle (see radial_gradient_coords.jpg). (fx, fy) should be inside the circle, otherwise some areas will not be defined.
RadioButton(string $name,integer $w,array $prop = array(),array $opt = array(),string $onvalue = 'On',boolean $checked = false,float|null $x = null,float|null $y = null,boolean $js = false)
public | |
---|---|
author | Nicola Asuni |
since | 4.8.000 (2009-09-07) |
string
Field name.
integer
Width of the radio button.
array
Javascript field properties. Possible values are described on official Javascript for Acrobat API reference.
array
Annotation parameters. Possible values are described on official PDF32000_2008 reference.
string
Value to be returned if selected.
boolean
Define the initial state.
float|null
Abscissa of the upper-left corner of the rectangle
float|null
Ordinate of the upper-left corner of the rectangle
boolean
If true put the field using JavaScript (requires Acrobat Writer to be rendered).
Rect(float $x,float $y,float $w,float $h,string $style = '',array $border_style = array(),array $fill_color = array())
public | |
---|---|
since | 1.0 |
see | \SetLineStyle() |
float
Abscissa of upper-left corner.
float
Ordinate of upper-left corner.
float
Width.
float
Height.
string
Style of rendering. See the getPathPaintOperator() function for more information.
array
Border style of rectangle. Array with keys among the following:
If a key is not present or is null, the correspondent border is not drawn. Default value: default line style (empty array).
array
Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K) or array(C,M,Y,K,SpotColorName). Default value: default color (empty array).
registrationMark(float $x,float $y,float $r,boolean $double = false,array $cola = array(100, 100, 100, 100, 'All'),array $colb = array(0, 0, 0, 0, 'None'))
author | Nicola Asuni |
---|---|
since | 4.9.000 (2010-03-26) |
public | |
float
abscissa of the registration mark center.
float
ordinate of the registration mark center.
float
radius of the crop mark.
boolean
if true print two concentric crop marks.
array
crop mark color (default spot registration color 'All').
array
second crop mark color (default spot registration color 'None').
registrationMarkCMYK(float $x,float $y,float $r)
author | Nicola Asuni |
---|---|
since | 6.0.038 (2013-09-30) |
public | |
float
abscissa of the registration mark center.
float
ordinate of the registration mark center.
float
radius of the crop mark.
RegularPolygon(float $x0,float $y0,float $r,integer $ns,float $angle,boolean $draw_circle = false,string $style = '',array $line_style = array(),array $fill_color = array(),string $circle_style = '',array $circle_outLine_style = array(),array $circle_fill_color = array())
public | |
---|---|
since | 2.1.000 (2008-01-08) |
float
Abscissa of center point.
float
Ordinate of center point.
float
Radius of inscribed circle.
integer
Number of sides.
float
Angle oriented (anti-clockwise). Default value: 0.
boolean
Draw inscribed circle or not. Default value: false.
string
Style of rendering. See the getPathPaintOperator() function for more information.
array
Line style of polygon sides. Array with keys among the following:
If a key is not present or is null, not draws the side. Default value is default line style (empty array).
array
Fill color. Format: array(red, green, blue). Default value: default color (empty array).
string
Style of rendering of inscribed circle (if draws). Possible values are:
array
Line style of inscribed circle (if draws). Array like for SetLineStyle(). Default value: default line style (empty array).
array
Fill color of inscribed circle (if draws). Format: array(red, green, blue). Default value: default color (empty array).
removePageRegion(integer $key)
author | Nicola Asuni |
---|---|
public | |
since | 5.9.003 (2010-10-13) |
see | \setPageRegions(), getPageRegions() |
integer
region key
removeTagNamespace(string $name)
protected | |
---|---|
string
Tag name
replaceBuffer(string $data)
protected | |
---|---|
since | 5.5.000 (2010-06-22) |
string
data
replaceChar(integer $oldchar,integer $newchar): integer
protected | |
---|---|
since | 5.9.167 (2012-06-22) |
integer
Integer code (unicode) of the character to replace.
integer
Integer code (unicode) of the new character.
integer
the replaced char or the old char in case the new char i not defined
replaceMissingChars(string $text,string $font = '',string $style = '',array $subs = array()): string
public | |
---|---|
since | 5.9.153 (2012-03-28) |
string
Text to process.
string
Font name (family name).
string
Font style.
array
Array of possible character substitutions. The key is the character to check (integer value) and the value is a single intege value or an array of possible substitutes.
string
Processed text.
replaceRightShiftPageNumAliases(string $page,array $aliases,integer $diff): string
This works perfectly only when using monospaced fonts.
protected |
---|
string
Page content.
array
Array of page aliases.
integer
initial difference to add.
string
replaced page content.
resetColumns()
public | |
---|---|
since | 5.9.072 (2011-04-26) |
resetHeaderTemplate()
public | |
---|---|
resetLastH()
public | |
---|---|
since | 5.9.000 (2010-10-03) |
rollbackTransaction(boolean $self = false): \TCPDF
public | |
---|---|
since | 4.5.029 (2009-03-19) |
boolean
if true restores current class object to previous state without the need of reassignment via the returned value.
\TCPDF
object.
Rotate(float $angle,float|null $x = null,float|null $y = null)
public | |
---|---|
since | 2.1.000 (2008-01-07) |
see | \StartTransform(), StopTransform() |
float
angle in degrees for counter-clockwise rotation
float|null
abscissa of the rotation center. Default is current x position
float|null
ordinate of the rotation center. Default is current y position
RoundedRect(float $x,float $y,float $w,float $h,float $r,string $round_corner = '1111',string $style = '',array $border_style = array(),array $fill_color = array())
public | |
---|---|
since | 2.1.000 (2008-01-08) |
float
Abscissa of upper-left corner.
float
Ordinate of upper-left corner.
float
Width.
float
Height.
float
the radius of the circle used to round off the corners of the rectangle.
string
Draws rounded corner or not. String with a 0 (not rounded i-corner) or 1 (rounded i-corner) in i-position. Positions are, in order and begin to 0: top right, bottom right, bottom left and top left. Default value: all rounded corner ("1111").
string
Style of rendering. See the getPathPaintOperator() function for more information.
array
Border style of rectangle. Array like for SetLineStyle(). Default value: default line style (empty array).
array
Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K) or array(C,M,Y,K,SpotColorName). Default value: default color (empty array).
RoundedRectXY(float $x,float $y,float $w,float $h,float $rx,float $ry,string $round_corner = '1111',string $style = '',array $border_style = array(),array $fill_color = array())
public | |
---|---|
since | 4.9.019 (2010-04-22) |
float
Abscissa of upper-left corner.
float
Ordinate of upper-left corner.
float
Width.
float
Height.
float
the x-axis radius of the ellipse used to round off the corners of the rectangle.
float
the y-axis radius of the ellipse used to round off the corners of the rectangle.
string
Draws rounded corner or not. String with a 0 (not rounded i-corner) or 1 (rounded i-corner) in i-position. Positions are, in order and begin to 0: top right, bottom right, bottom left and top left. Default value: all rounded corner ("1111").
string
Style of rendering. See the getPathPaintOperator() function for more information.
array
Border style of rectangle. Array like for SetLineStyle(). Default value: default line style (empty array).
array
Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K) or array(C,M,Y,K,SpotColorName). Default value: default color (empty array).
Scale(float $s_x,float $s_y,float|null $x = null,float|null $y = null)
public | |
---|---|
since | 2.1.000 (2008-01-07) |
see | \StartTransform(), StopTransform() |
float
scaling factor for width as percent. 0 is not allowed.
float
scaling factor for height as percent. 0 is not allowed.
float|null
abscissa of the scaling center. Default is current x position
float|null
ordinate of the scaling center. Default is current y position
ScaleX(float $s_x,integer $x = '',integer $y = '')
public | |
---|---|
since | 2.1.000 (2008-01-07) |
see | \StartTransform(), StopTransform() |
float
scaling factor for width as percent. 0 is not allowed.
integer
abscissa of the scaling center. Default is current x position
integer
ordinate of the scaling center. Default is current y position
ScaleXY(float $s,integer $x = '',integer $y = '')
public | |
---|---|
since | 2.1.000 (2008-01-07) |
see | \StartTransform(), StopTransform() |
float
scaling factor for width and height as percent. 0 is not allowed.
integer
abscissa of the scaling center. Default is current x position
integer
ordinate of the scaling center. Default is current y position
ScaleY(float $s_y,integer $x = '',integer $y = '')
public | |
---|---|
since | 2.1.000 (2008-01-07) |
see | \StartTransform(), StopTransform() |
float
scaling factor for height as percent. 0 is not allowed.
integer
abscissa of the scaling center. Default is current x position
integer
ordinate of the scaling center. Default is current y position
segSVGContentHandler(resource $parser,string $data)
author | Nicola Asuni |
---|---|
since | 5.0.000 (2010-05-02) |
protected | |
resource
The first parameter, parser, is a reference to the XML parser calling the handler.
string
The second parameter, data, contains the character data as a string.
selectColumn(integer|null $col = null)
public | |
---|---|
since | 4.9.001 (2010-03-28) |
integer|null
column number (from 0 to getNumberOfColumns()-1); empty string = current column.
serializeTCPDFtagParameters(array $data): string
public | static |
---|
array
parameters array
string
containing serialized data
setAbsX(float $x)
public | |
---|---|
since | 5.9.186 (2012-09-13) |
see | \setAbsX(), setAbsY(), SetAbsXY() |
float
The value of the abscissa in user units.
setAbsXY(float $x,float $y)
public | |
---|---|
since | 5.9.186 (2012-09-13) |
see | \setAbsX(), setAbsY(), SetAbsXY() |
float
The value of the abscissa in user units.
float
(float) The value of the ordinate in user units.
setAbsY(float $y)
public | |
---|---|
since | 5.9.186 (2012-09-13) |
see | \setAbsX(), setAbsY(), SetAbsXY() |
float
(float) The value of the ordinate in user units.
setAllowLocalFiles(boolean $allowLocalFiles)
public | |
---|---|
since | 6.4 |
boolean
true, when local files should be allowed. Otherwise false.
setAlpha(float $stroking = 1,string $bm = 'Normal',float|null $nonstroking = null,boolean $ais = false)
public | |
---|---|
since | 3.0.000 (2008-03-27) |
float
Alpha value for stroking operations: real value from 0 (transparent) to 1 (opaque).
string
blend mode, one of the following: Normal, Multiply, Screen, Overlay, Darken, Lighten, ColorDodge, ColorBurn, HardLight, SoftLight, Difference, Exclusion, Hue, Saturation, Color, Luminosity
float|null
Alpha value for non-stroking operations: real value from 0 (transparent) to 1 (opaque).
boolean
setAuthor(string $author)
public | |
---|---|
since | 1.2 |
see | \SetCreator(), SetKeywords(), SetSubject(), SetTitle() |
string
The name of the author.
setAutoPageBreak(boolean $auto,float $margin)
public | |
---|---|
since | 1.0 |
see | \Cell(), MultiCell(), AcceptPageBreak() |
boolean
Boolean indicating if mode should be on or off.
float
Distance from the bottom of the page.
setBarcode(string $bc = '')
public | |
---|---|
string
barcode
setBooklet(boolean $booklet = true,float $inner = -1,float $outer = -1)
public | |
---|---|
since | 4.2.000 (2008-10-29) |
boolean
true set the booklet mode on, false otherwise.
float
Inner page margin.
float
Outer page margin.
setBookmark(string $txt,integer $level,float $y = -1,integer|string $page = '',string $style = '',array $color = array(0, 0, 0),float $x = -1,mixed $link = '')
public | |
---|---|
string
Bookmark description.
integer
Bookmark level (minimum value is 0).
float
Y position in user units of the bookmark on the selected page (default = -1 = current position; 0 = page start;).
integer|string
Target page number (leave empty for current page). If you prefix a page number with the * character, then this page will not be changed when adding/deleting/moving pages.
string
Font style: B = Bold, I = Italic, BI = Bold + Italic.
array
RGB color array (values from 0 to 255).
float
X position in user units of the bookmark on the selected page (default = -1 = current position;).
mixed
URL, or numerical link ID, or named destination (# character followed by the destination name), or embedded file (* character followed by the file name).
setBuffer(string $data)
protected | |
---|---|
since | 4.5.000 (2009-01-02) |
string
data
setCellHeightRatio(float $h)
public | |
---|---|
since | 3.0.014 (2008-06-04) |
float
cell proportion respect font height (typical value = 1.25).
setCellMargins(integer|float|null $left = null,integer|float|null $top = null,integer|float|null $right = null,integer|float|null $bottom = null)
public | |
---|---|
since | 5.9.000 (2010-10-03) |
see | \TCPDF::getCellMargins() |
integer|float|null
left margin
integer|float|null
top margin
integer|float|null
right margin
integer|float|null
bottom margin
setCellPadding(integer|float $pad)
public | |
---|---|
since | 2.1.000 (2008-01-09) |
see | \getCellPaddings(), setCellPaddings() |
integer|float
internal padding.
setCellPaddings(integer|float|null $left = null,integer|float|null $top = null,integer|float|null $right = null,integer|float|null $bottom = null)
public | |
---|---|
since | 5.9.000 (2010-10-03) |
see | \getCellPaddings(), SetCellPadding() |
integer|float|null
left padding
integer|float|null
top padding
integer|float|null
right padding
integer|float|null
bottom padding
setColor(string $type,float $col1,float $col2 = -1,float $col3 = -1,float $col4 = -1,boolean $ret = false,string $name = ''): string
public | |
---|---|
since | 5.9.125 (2011-10-03) |
string
Type of object affected by this color: ('draw', 'fill', 'text').
float
GRAY level for single color, or Red color for RGB (0-255), or CYAN color for CMYK (0-100).
float
GREEN color for RGB (0-255), or MAGENTA color for CMYK (0-100).
float
BLUE color for RGB (0-255), or YELLOW color for CMYK (0-100).
float
KEY (BLACK) color for CMYK (0-100).
boolean
If true do not send the command.
string
spot color name (if any)
string
The PDF command or empty string.
setColorArray(string $type,array $color,boolean $ret = false): string
It can be expressed in RGB, CMYK or GRAY SCALE components. The method can be called before the first page is created and the value is retained from page to page.
public | |
---|---|
since | 3.1.000 (2008-06-11) |
string
Type of object affected by this color: ('draw', 'fill', 'text').
array
Array of colors (1=gray, 3=RGB, 4=CMYK or 5=spotcolor=CMYK+name values).
boolean
If true do not send the PDF command.
string
The PDF command or empty string.
setColumnsArray(array $columns)
Each column is represented by an array of arrays with the following keys: (w = width, s = space between columns, y = column top position).
public | |
---|---|
since | 4.9.001 (2010-03-28) |
array
setCompression(boolean $compress = true)
Note: the Zlib extension is required for this feature. If not present, compression will be turned off.
public | |
---|---|
since | 1.4 |
boolean
Boolean indicating if compression must be enabled.
setContentMark(integer $page)
Borders and fills are always created after content and inserted on the position marked by this method.
protected | |
---|---|
since | 4.6.021 (2009-07-20) |
integer
page number (default is the current page)
setCreator(string $creator)
public | |
---|---|
since | 1.2 |
see | \SetAuthor(), SetKeywords(), SetSubject(), SetTitle() |
string
The name of the creator.
setDefaultMonospacedFont(string $font)
public | |
---|---|
since | 4.5.025 |
string
Font name.
setDefaultTableColumns(integer $cols = 4)
public | |
---|---|
since | 3.0.014 (2008-06-04) |
integer
number of columns
setDestination(string $name,float $y = -1,integer|string $page = '',float $x = -1): string|false
NOTE: destination names are unique, so only last entry will be saved.
public | |
---|---|
author | Christian Deligant, Nicola Asuni |
since | 5.9.097 (2011-06-23) |
string
Destination name.
float
Y position in user units of the destiantion on the selected page (default = -1 = current position; 0 = page start;).
integer|string
Target page number (leave empty for current page). If you prefix a page number with the * character, then this page will not be changed when adding/deleting/moving pages.
float
X position in user units of the destiantion on the selected page (default = -1 = current position;).
string|false
Stripped named destination identifier or false in case of error.
setDisplayMode(mixed $zoom,string $layout = 'SinglePage',string $mode = 'UseNone')
public | |
---|---|
since | 1.2 |
mixed
The zoom to use. It can be one of the following string values or a number indicating the zooming factor to use.
string
The page layout. Possible values are:
string
A name object specifying how the document should be displayed when opened:
setDocCreationTimestamp(mixed $time)
public | |
---|---|
since | 5.9.152 (2012-03-23) |
mixed
Document creation timestamp in seconds or date-time string.
setDocInfoUnicode(boolean $unicode = true)
This has effect only when unicode mode is set to false.
since | 5.9.027 (2010-12-01) |
---|---|
public | |
boolean
if true set the meta information in Unicode
setDocModificationTimestamp(mixed $time)
public | |
---|---|
since | 5.9.152 (2012-03-23) |
mixed
Document modification timestamp in seconds or date-time string.
setDrawColor(float $col1,float $col2 = -1,float $col3 = -1,float $col4 = -1,boolean $ret = false,string $name = ''): string
public | |
---|---|
since | 1.3 |
see | \SetDrawColorArray(), SetFillColor(), SetTextColor(), Line(), Rect(), Cell(), MultiCell() |
float
GRAY level for single color, or Red color for RGB (0-255), or CYAN color for CMYK (0-100).
float
GREEN color for RGB (0-255), or MAGENTA color for CMYK (0-100).
float
BLUE color for RGB (0-255), or YELLOW color for CMYK (0-100).
float
KEY (BLACK) color for CMYK (0-100).
boolean
If true do not send the command.
string
spot color name (if any)
string
the PDF command
setDrawColorArray(array $color,boolean $ret = false): string
It can be expressed in RGB, CMYK or GRAY SCALE components. The method can be called before the first page is created and the value is retained from page to page.
public | |
---|---|
since | 3.1.000 (2008-06-11) |
see | \SetDrawColor() |
array
Array of colors (1, 3 or 4 values).
boolean
If true do not send the PDF command.
string
the PDF command
setDrawSpotColor(string $name,float $tint = 100)
public | |
---|---|
since | 4.0.024 (2008-09-12) |
see | \AddSpotColor(), SetFillSpotColor(), SetTextSpotColor() |
string
Name of the spot color.
float
Intensity of the color (from 0 to 100 ; 100 = full intensity by default).
setEqualColumns(integer $numcols,integer $width,integer|null $y = null)
public | |
---|---|
since | 4.9.001 (2010-03-28) |
integer
number of columns (set to zero to disable columns mode)
integer
column width
integer|null
column starting Y position (leave empty for current Y position)
setExtGState(integer $gs)
protected | |
---|---|
since | 3.0.000 (2008-03-27) |
integer
extgstate
setExtraXMP(string $xmp)
IMPORTANT: This data is added as-is without controls, so you have to validate your data before using this method!
since | 5.9.128 (2011-10-06) |
---|---|
public | |
string
Custom XMP data.
setExtraXMPRDF(string $xmp)
IMPORTANT: This data is added as-is without controls, so you have to validate your data before using this method!
since | 6.3.0 (2019-09-19) |
---|---|
public | |
string
Custom XMP RDF data.
setFillColor(float $col1,float $col2 = -1,float $col3 = -1,float $col4 = -1,boolean $ret = false,string $name = ''): string
public | |
---|---|
since | 1.3 |
see | \SetFillColorArray(), SetDrawColor(), SetTextColor(), Rect(), Cell(), MultiCell() |
float
GRAY level for single color, or Red color for RGB (0-255), or CYAN color for CMYK (0-100).
float
GREEN color for RGB (0-255), or MAGENTA color for CMYK (0-100).
float
BLUE color for RGB (0-255), or YELLOW color for CMYK (0-100).
float
KEY (BLACK) color for CMYK (0-100).
boolean
If true do not send the command.
string
Spot color name (if any).
string
The PDF command.
setFillColorArray(array $color,boolean $ret = false)
It can be expressed in RGB, CMYK or GRAY SCALE components. The method can be called before the first page is created and the value is retained from page to page.
public | |
---|---|
since | 3.1.000 (2008-6-11) |
see | \SetFillColor() |
array
Array of colors (1, 3 or 4 values).
boolean
If true do not send the PDF command.
setFillSpotColor(string $name,float $tint = 100)
public | |
---|---|
since | 4.0.024 (2008-09-12) |
see | \AddSpotColor(), SetDrawSpotColor(), SetTextSpotColor() |
string
Name of the spot color.
float
Intensity of the color (from 0 to 100 ; 100 = full intensity by default).
setFont(string $family,string $style = '',float|null $size = null,string $fontfile = '',mixed $subset = 'default',boolean $out = true)
The font can be either a standard one or a font added via the AddFont() method. Standard fonts use Windows encoding cp1252 (Western Europe). The method can be called before the first page is created and the font is retained from page to page. If you just wish to change the current font size, it is simpler to call SetFontSize(). Note: for the standard fonts, the font metric files must be accessible. There are three possibilities for this:
author | Nicola Asuni |
---|---|
public | |
since | 1.0 |
see | \AddFont(), SetFontSize() |
string
Family font. It can be either a name defined by AddFont() or one of the standard Type1 families (case insensitive):
string
Font style. Possible values are (case insensitive):
float|null
Font size in points. The default value is the current size. If no size has been specified since the beginning of the document, the value taken is 12
string
The font definition file. By default, the name is built from the family and style, in lower case with no spaces.
mixed
if true embedd only a subset of the font (stores only the information related to the used characters); if false embedd full font; if 'default' uses the default value set using setFontSubsetting(). This option is valid only for TrueTypeUnicode fonts. If you want to enable users to change the document, set this parameter to false. If you subset the font, the person who receives your PDF would need to have your same font in order to make changes to your PDF. The file size of the PDF would also be smaller because you are embedding only part of a font.
boolean
if true output the font size command, otherwise only set the font properties.
setFontBuffer(string $font,array $data)
protected | |
---|---|
since | 4.5.000 (2009-01-02) |
string
font key
array
font data
setFontSize(float $size,boolean $out = true)
public | |
---|---|
since | 1.0 |
see | \SetFont() |
float
The font size in points.
boolean
if true output the font size command, otherwise only set the font properties.
setFontSpacing(float $spacing)
author | Nicola Asuni |
---|---|
public | |
since | 5.9.000 (2010-09-29) |
float
amount to increase or decrease the space between characters in a text (0 = default spacing)
setFontStretching(integer $perc = 100)
author | Nicola Asuni |
---|---|
public | |
since | 5.9.000 (2010-09-29) |
integer
percentage of stretching (100 = no stretching)
setFontSubBuffer(string $font,string $key,mixed $data)
protected | |
---|---|
since | 4.5.000 (2009-01-02) |
string
font key
string
font sub-key
mixed
font data
setFontSubsetting(boolean $enable = true)
author | Nicola Asuni |
---|---|
public | |
since | 5.3.002 (2010-06-07) |
boolean
if true enable font subsetting by default.
setFormDefaultProp(array $prop = array())
public | |
---|---|
author | Nicola Asuni |
since | 4.8.000 (2009-09-06) |
array
javascript field properties. Possible values are described on official Javascript for Acrobat API reference.
setGraphicVars(array $gvars,boolean $extended = false)
protected | |
---|---|
since | 4.2.010 (2008-11-14) |
array
array of graphic variablesto restore
boolean
if true restore extended graphic variables
setHeader()
protected | |
---|---|
since | 4.0.012 (2008-07-24) |
setHeaderData(string $ln = '',integer $lw,string $ht = '',string $hs = '',array<mixed,integer> $tc = array(0, 0, 0),array<mixed,integer> $lc = array(0, 0, 0))
public | |
---|---|
string
header image logo
integer
header image logo width in mm
string
string to print as title on document header
string
string to print on document header
array<mixed,integer>
RGB array color for text.
array<mixed,integer>
RGB array color for line.
setHeaderFont(\array<int,string|float|\null> $font)
phpstan-param | array{0: string, 1: string, 2: float|null} $font |
---|---|
public | |
since | 1.1 |
\array
Array describing the basic font parameters: (family, style, size).
setHeaderMargin(integer $hm = 10)
(minimum distance between header and top page margin)
public | |
---|---|
integer
distance in user units
setHeaderTemplateAutoreset(boolean $val = true)
public | |
---|---|
boolean
set to true to reset Header xobject template at each page, false otherwise.
setHtmlLinksStyle(array $color = array(0, 0, 255),string $fontstyle = 'U')
public | |
---|---|
since | 4.4.003 (2008-12-09) |
array
RGB array of colors
string
additional font styles to add
setHtmlVSpace(array $tagvs)
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.
public | |
---|---|
since | 4.2.001 (2008-10-30) |
array
array of tags and relative vertical spaces.
setImageBuffer(string $image,array $data): integer
protected | |
---|---|
since | 4.5.000 (2008-12-31) |
string
image key
array
image data
integer
image index number
setImageScale(float $scale)
author | Nicola Asuni |
---|---|
public | |
since | 1.5.2 |
float
adjusting factor to convert pixels to user units.
setImageSubBuffer(string $image,string $key,array $data)
protected | |
---|---|
since | 4.5.000 (2008-12-31) |
string
image key
string
image sub-key
array
image data
setJPEGQuality(integer $quality)
public | |
---|---|
since | 3.0.000 (2008-03-27) |
integer
JPEG quality, integer between 1 and 100
setKeywords(string $keywords)
..'.
public | |
---|---|
since | 1.2 |
see | \SetAuthor(), SetCreator(), SetSubject(), SetTitle() |
string
The list of keywords.
setLanguageArray(array $language)
public | |
---|---|
since | 1.1 |
array
setLastH(float $h)
author | Nicola Asuni |
---|---|
public | |
since | 1.53.0.TC034 |
float
cell height.
setLeftMargin(integer|float $margin)
public | |
---|---|
since | 1.4 |
see | \SetTopMargin(), SetRightMargin(), SetAutoPageBreak(), SetMargins() |
integer|float
The margin.
setLineStyle(array $style,boolean $ret = false): string
public | |
---|---|
since | 2.1.000 (2008-01-08) |
array
Line style. Array with keys among the following:
boolean
if true do not send the command.
string
the PDF command
setLineWidth(float $width)
public | |
---|---|
since | 1.0 |
see | \Line(), Rect(), Cell(), MultiCell() |
float
The width.
setLink(integer $link,float $y,integer|string $page = -1)
public | |
---|---|
since | 1.5 |
see | \TCPDF::AddLink() |
integer
The link identifier returned by AddLink()
float
Ordinate of target position; -1 indicates the current position. The default value is 0 (top of page)
integer|string
Number of target page; -1 indicates the current page (default value). If you prefix a page number with the * character, then this page will not be changed when adding/deleting/moving pages.
setListIndentWidth(float $width)
public | |
---|---|
since | 4.2.007 (2008-11-12) |
float
width of the indentation. Use negative value to disable it.
setLIsymbol(string $symbol = '!')
public | |
---|---|
since | 4.0.028 (2008-09-26) |
string
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', 'img|type|width|height|image.ext')
setMargins(integer|float $left,integer|float $top,integer|float|null $right = null,boolean $keepmargins = false)
public | |
---|---|
since | 1.0 |
see | \SetLeftMargin(), SetTopMargin(), SetRightMargin(), SetAutoPageBreak() |
integer|float
Left margin.
integer|float
Top margin.
integer|float|null
Right margin. Default value is the left one.
boolean
if true overwrites the default page margins
setOpenCell(boolean $isopen)
public | |
---|---|
since | 4.2.010 (2008-11-14) |
boolean
if true keeps the top/bottom border open for the cell sides that cross the page.
setOverprint(boolean $stroking = true,boolean|null $nonstroking = null,integer $mode)
(Check the "Entries in a Graphics State Parameter Dictionary" on PDF 32000-1:2008).
public | |
---|---|
since | 5.9.152 (2012-03-23) |
boolean
If true apply overprint for stroking operations.
boolean|null
If true apply overprint for painting operations other than stroking.
integer
Overprint mode: (0 = each source colour component value replaces the value previously painted for the corresponding device colorant; 1 = a tint value of 0.0 for a source colour component shall leave the corresponding component of the previously painted colour unchanged).
setPage(integer $pnum,boolean $resetmargins = false)
public | |
---|---|
since | 2.1.000 (2008-01-07) |
see | \getPage(), lastpage(), getNumPages() |
integer
page number (1 ... numpages)
boolean
if true reset left, right, top margins and Y position.
setPageBoxTypes(array $boxes)
protected | |
---|---|
array
Array of page boxes to set on document: ('MediaBox', 'CropBox', 'BleedBox', 'TrimBox', 'ArtBox').
setPageBuffer(integer $page,string $data,boolean $append = false)
protected | |
---|---|
since | 4.5.000 (2008-12-31) |
integer
page number
string
page data
boolean
if true append data, false replace.
setPageFormat(mixed $format,string $orientation = 'P')
protected | |
---|---|
since | 3.0.015 (2008-06-06) |
see | \getPageSizeFromFormat() |
mixed
The format used for pages. It can be either: one of the string values specified at getPageSizeFromFormat() documentation or an array of two numbers (width, height) or an array containing the following measures and options:
string
page orientation. Possible values are (case insensitive):
setPageMark()
Borders and fills are always created after content and inserted on the position marked by this method. This function must be called after calling Image() function for a background image. Background images must be always inserted before calling Multicell() or WriteHTMLCell() or WriteHTML() functions.
public | |
---|---|
since | 4.0.016 (2008-07-30) |
setPageOrientation(string $orientation,boolean|null $autopagebreak = null,float|null $bottommargin = null)
public | |
---|---|
since | 3.0.015 (2008-06-06) |
string
page orientation. Possible values are (case insensitive):
boolean|null
Boolean indicating if auto-page-break mode should be on or off.
float|null
bottom margin of the page.
setPageRegions(array $regions = array())
A no-write region is a portion of the page with a rectangular or trapezium shape that will not be covered when writing text or html code. A region is always aligned on the left or right side of the page ad is defined using a vertical segment. You can set multiple regions for the same page.
author | Nicola Asuni |
---|---|
public | |
since | 5.9.003 (2010-10-13) |
see | \addPageRegion(), getPageRegions() |
array
array of no-write regions. For each region you can define an array as follow: ('page' => page number or empy for current page, 'xt' => X top, 'yt' => Y top, 'xb' => X bottom, 'yb' => Y bottom, 'side' => page side 'L' = left or 'R' = right). Omit this parameter to remove all regions.
setPageUnit(string $unit)
public | |
---|---|
since | 3.0.015 (2008-06-06) |
string
User measure unit. Possible values are:
setPDFVersion(string $version = '1.7')
public | |
---|---|
since | 3.1.000 (2008-06-09) |
string
PDF document version.
setPrintHeader(boolean $val = true)
public | |
---|---|
boolean
set to true to print the page header (default), false otherwise.
setProtection(array $permissions = array('print', 'modify', 'copy', 'annot-forms', 'fill-forms', 'extract', 'assemble', 'print-high'),string $user_pass = '',string|null $owner_pass = null,integer $mode,array|null $pubkeys = null)
If you don't set any password, the document will open as usual. If you set a user password, the PDF viewer will ask for it before displaying the document. The master password, if different from the user one, can be used to get full access. Note: protecting a document requires to encrypt it, which increases the processing time a lot. This can cause a PHP time-out in some cases, especially if the document contains images or fonts.
public | |
---|---|
since | 2.0.000 (2008-01-02) |
author | Nicola Asuni |
array
the set of permissions (specify the ones you want to block):
string
user password. Empty by default.
string|null
owner password. If not specified, a random value is used.
integer
encryption strength: 0 = RC4 40 bit; 1 = RC4 128 bit; 2 = AES 128 bit; 3 = AES 256 bit.
array|null
array of recipients containing public-key certificates ('c') and permissions ('p'). For example: array(array('c' => 'file://../examples/data/cert/tcpdf.crt', 'p' => array('print')))
setRasterizeVectorImages(boolean $mode)
public | |
---|---|
since | 5.0.000 (2010-04-27) |
boolean
if true enable rasterization, false otherwise.
setRightMargin(integer|float $margin)
public | |
---|---|
since | 1.5 |
see | \SetLeftMargin(), SetTopMargin(), SetAutoPageBreak(), SetMargins() |
integer|float
The margin.
setRTL(boolean $enable,boolean $resetx = true)
public | |
---|---|
since | 2.0.000 (2008-01-03) |
boolean
if true enable Right-To-Left language mode.
boolean
if true reset the X position on direction change.
setSignature(mixed $signing_cert = '',mixed $private_key = '',string $private_key_password = '',string $extracerts = '',integer $cert_type = 2,array $info = array(),string $approval = '')
The digital signature improve document authenticity and integrity and allows o enable extra features on Acrobat Reader. To create self-signed signature: openssl req -x509 -nodes -days 365000 -newkey rsa:1024 -keyout tcpdf.crt -out tcpdf.crt To export crt to p12: openssl pkcs12 -export -in tcpdf.crt -out tcpdf.p12 To convert pfx certificate to pem: openssl pkcs12 -in tcpdf.pfx -out tcpdf.crt -nodes
public | |
---|---|
author | Nicola Asuni |
since | 4.6.005 (2009-04-24) |
mixed
signing certificate (string or filename prefixed with 'file://')
mixed
private key (string or filename prefixed with 'file://')
string
password
string
specifies the name of a file containing a bunch of extra certificates to include in the signature which can for example be used to help the recipient to verify the certificate that you used.
integer
The access permissions granted for this document. Valid values shall be: 1 = No changes to the document shall be permitted; any change to the document shall invalidate the signature; 2 = Permitted changes shall be filling in forms, instantiating page templates, and signing; other changes shall invalidate the signature; 3 = Permitted changes shall be the same as for 2, as well as annotation creation, deletion, and modification; other changes shall invalidate the signature.
array
array of option information: Name, Location, Reason, ContactInfo.
string
Enable approval signature eg. for PDF incremental update
setSignatureAppearance(float $x,float $y,float $w,float $h,integer $page = -1,string $name = '')
public | |
---|---|
author | Nicola Asuni |
since | 5.3.011 (2010-06-17) |
float
Abscissa of the upper-left corner.
float
Ordinate of the upper-left corner.
float
Width of the signature area.
float
Height of the signature area.
integer
option page number (if < 0 the current page is used).
string
Name of the signature.
setSpacesRE(string $re = '/[^\S\xa0]/')
The pattern delimiter must be the forward-slash character "/". Some example patterns are:
Non-Unicode or missing PCRE unicode support: "/[^\S\xa0]/" Unicode and PCRE unicode support: "/(?!\xa0)[\s\p{Z}]/u" Unicode and PCRE unicode support in Chinese mode: "/(?!\xa0)[\s\p{Z}\p{Lo}]/u" if PCRE unicode support is turned ON ("\P" is the negate class of "\p"): \s : any whitespace character \p{Z} : any separator \p{Lo} : Unicode letter or ideograph that does not have lowercase and uppercase variants. Is used to chunk chinese words. \xa0 : Unicode Character 'NO-BREAK SPACE' (U+00A0)
public | |
---|---|
since | 4.6.016 (2009-06-15) |
string
regular expression (leave empty for default).
setSpotColor(string $type,string $name,float $tint = 100): string
public | |
---|---|
since | 5.9.125 (2011-10-03) |
string
Type of object affected by this color: ('draw', 'fill', 'text').
string
Name of the spot color.
float
Intensity of the color (from 0 to 100 ; 100 = full intensity by default).
string
PDF color command.
setSRGBmode(boolean $mode = false)
public | |
---|---|
since | 5.9.121 (2011-09-28) |
boolean
If true force sRGB output intent.
setStartingPageNumber(integer $num = 1)
since | 5.9.093 (2011-06-16) |
---|---|
public | |
integer
Starting page number.
setSubject(string $subject)
public | |
---|---|
since | 1.2 |
see | \SetAuthor(), SetCreator(), SetKeywords(), SetTitle() |
string
The subject.
setSVGStyles(array $svgstyle,array $prevsvgstyle,integer $x,integer $y,integer $w = 1,integer $h = 1,string $clip_function = '',array $clip_params = array()): string
author | Nicola Asuni |
---|---|
since | 5.0.000 (2010-05-02) |
protected |
array
array of SVG styles to apply
array
array of previous SVG style
integer
X origin of the bounding box
integer
Y origin of the bounding box
integer
width of the bounding box
integer
height of the bounding box
string
clip function
array
array of parameters for clipping function
string
style
setTableHeader()
protected | |
---|---|
since | 4.5.030 (2009-03-25) |
setTempRTL(false|string $mode)
public | |
---|---|
since | 2.1.000 (2008-01-09) |
false|string
can be false, 'L' for LTR or 'R' for RTL
setTextColor(float $col1,float $col2 = -1,float $col3 = -1,float $col4 = -1,boolean $ret = false,string $name = ''): string
public | |
---|---|
since | 1.3 |
see | \SetTextColorArray(), SetDrawColor(), SetFillColor(), Text(), Cell(), MultiCell() |
float
GRAY level for single color, or Red color for RGB (0-255), or CYAN color for CMYK (0-100).
float
GREEN color for RGB (0-255), or MAGENTA color for CMYK (0-100).
float
BLUE color for RGB (0-255), or YELLOW color for CMYK (0-100).
float
KEY (BLACK) color for CMYK (0-100).
boolean
If true do not send the command.
string
Spot color name (if any).
string
Empty string.
setTextColorArray(array $color,boolean $ret = false)
The method can be called before the first page is created and the value is retained from page to page.
public | |
---|---|
since | 3.1.000 (2008-6-11) |
see | \SetFillColor() |
array
Array of colors (1, 3 or 4 values).
boolean
If true do not send the PDF command.
setTextRenderingMode(integer $stroke,boolean $fill = true,boolean $clip = false)
public | |
---|---|
since | 4.9.008 (2009-04-02) |
integer
outline size in user units (0 = disable).
boolean
if true fills the text (default).
boolean
if true activate clipping mode
setTextShadow(array $params = array('enabled' => false, 'depth_w' => 0, 'depth_h' => 0, 'color' => false, 'opacity' => 1, 'blend_mode' => 'Normal'))
since | 5.9.174 (2012-07-25) |
---|---|
public | |
array
Array of parameters: enabled (boolean) set to true to enable shadow; depth_w (float) shadow width in user units; depth_h (float) shadow height in user units; color (array) shadow color or false to use the stroke color; opacity (float) Alpha value: real value from 0 (transparent) to 1 (opaque); blend_mode (string) blend mode, one of the following: Normal, Multiply, Screen, Overlay, Darken, Lighten, ColorDodge, ColorBurn, HardLight, SoftLight, Difference, Exclusion, Hue, Saturation, Color, Luminosity.
setTextSpotColor(string $name,integer $tint = 100)
public | |
---|---|
since | 4.0.024 (2008-09-12) |
see | \AddSpotColor(), SetDrawSpotColor(), SetFillSpotColor() |
string
Name of the spot color.
integer
Intensity of the color (from 0 to 100 ; 100 = full intensity by default).
setTimeStamp(string $tsa_host = '',string $tsa_username = '',string $tsa_password = '',string $tsa_cert = '')
The trusted timestamping improve document security that means that no one should be able to change the document once it has been recorded. Use with digital signature only!
public | |
---|---|
author | Richard Stockinger |
since | 6.0.090 (2014-06-16) |
string
Time Stamping Authority (TSA) server (prefixed with 'https://')
string
Specifies the username for TSA authorization (optional) OR specifies the TSA authorization PEM file (see: example_66.php, optional)
string
Specifies the password for TSA authorization (optional)
string
Specifies the location of TSA certificate for authorization (optional for cURL)
setTitle(string $title)
public | |
---|---|
since | 1.2 |
see | \SetAuthor(), SetCreator(), SetKeywords(), SetSubject() |
string
The title.
setTopMargin(integer|float $margin)
public | |
---|---|
since | 1.5 |
see | \SetLeftMargin(), SetRightMargin(), SetAutoPageBreak(), SetMargins() |
integer|float
The margin.
setUserRights(boolean $enable = true,string $document = '/FullSave',string $annots = '/Create/Delete/Modify/Copy/Import/Export',string $form = '/Add/Delete/FillIn/Import/Export/SubmitStandalone/SpawnTemplate',string $signature = '/Modify',string $ef = '/Create/Delete/Modify/Import',string $formex = '')
Check the PDF Reference 8.7.1 Transform Methods, Table 8.105 Entries in the UR transform parameters dictionary
public | |
---|---|
author | Nicola Asuni |
since | 2.9.000 (2008-03-26) |
boolean
if true enable user's rights on PDF reader
string
Names specifying additional document-wide usage rights for the document. The only defined value is "/FullSave", which permits a user to save the document along with modified form and/or annotation data.
string
Names specifying additional annotation-related usage rights for the document. Valid names in PDF 1.5 and later are /Create/Delete/Modify/Copy/Import/Export, which permit the user to perform the named operation on annotations.
string
Names specifying additional form-field-related usage rights for the document. Valid names are: /Add/Delete/FillIn/Import/Export/SubmitStandalone/SpawnTemplate
string
Names specifying additional signature-related usage rights for the document. The only defined value is /Modify, which permits a user to apply a digital signature to an existing signature form field or clear a signed signature form field.
string
Names specifying additional usage rights for named embedded files in the document. Valid names are /Create/Delete/Modify/Import, which permit the user to perform the named operation on named embedded files Names specifying additional embedded-files-related usage rights for the document.
string
Names specifying additional form-field-related usage rights. The only valid name is BarcodePlaintext, which permits text form field data to be encoded as a plaintext two-dimensional barcode.
setViewerPreferences(array $preferences)
(see Section 8.1 of PDF reference, "Viewer Preferences").
author | Nicola Asuni |
---|---|
public | |
since | 3.1.000 (2008-06-09) |
array
array of options.
setVisibility(string $v)
This can be useful, for instance, to put a background image or color that will show on screen but won't print.
public | |
---|---|
since | 3.0.000 (2008-03-27) |
string
visibility mode. Legal values are: all, print, screen or view.
setX(float $x,boolean $rtloff = false)
If the passed value is negative, it is relative to the right of the page (or left if language is RTL).
public | |
---|---|
since | 1.2 |
see | \GetX(), GetY(), SetY(), SetXY() |
float
The value of the abscissa in user units.
boolean
if true always uses the page top-left corner as origin of axis.
setXY(float $x,float $y,boolean $rtloff = false)
If the passed values are negative, they are relative respectively to the right and bottom of the page.
public | |
---|---|
since | 1.2 |
see | \SetX(), SetY() |
float
The value of the abscissa.
float
The value of the ordinate.
boolean
if true always uses the page top-left corner as origin of axis.
setY(float $y,boolean $resetx = true,boolean $rtloff = false)
If the passed value is negative, it is relative to the bottom of the page.
public | |
---|---|
since | 1.0 |
see | \GetX(), GetY(), SetY(), SetXY() |
float
The value of the ordinate in user units.
boolean
if true (default) reset the X position.
boolean
if true always uses the page top-left corner as origin of axis.
Skew(float $angle_x,float $angle_y,float|null $x = null,float|null $y = null)
public | |
---|---|
since | 2.1.000 (2008-01-07) |
see | \StartTransform(), StopTransform() |
float
angle in degrees between -90 (skew to the left) and 90 (skew to the right)
float
angle in degrees between -90 (skew to the bottom) and 90 (skew to the top)
float|null
abscissa of the skewing center. default is current x position
float|null
ordinate of the skewing center. default is current y position
SkewX(float $angle_x,float|null $x = null,float|null $y = null)
public | |
---|---|
since | 2.1.000 (2008-01-07) |
see | \StartTransform(), StopTransform() |
float
angle in degrees between -90 (skew to the left) and 90 (skew to the right)
float|null
abscissa of the skewing center. default is current x position
float|null
ordinate of the skewing center. default is current y position
SkewY(float $angle_y,float|null $x = null,float|null $y = null)
public | |
---|---|
since | 2.1.000 (2008-01-07) |
see | \StartTransform(), StopTransform() |
float
angle in degrees between -90 (skew to the bottom) and 90 (skew to the top)
float|null
abscissa of the skewing center. default is current x position
float|null
ordinate of the skewing center. default is current y position
sortBookmarks()
protected | |
---|---|
since | 5.9.119 (2011-09-19) |
StarPolygon(float $x0,float $y0,float $r,integer $nv,integer $ng,float $angle,boolean $draw_circle = false,string $style = '',array $line_style = array(),array $fill_color = array(),string $circle_style = '',array $circle_outLine_style = array(),array $circle_fill_color = array())
public | |
---|---|
since | 2.1.000 (2008-01-08) |
float
Abscissa of center point.
float
Ordinate of center point.
float
Radius of inscribed circle.
integer
Number of vertices.
integer
Number of gap (if ($ng % $nv = 1) then is a regular polygon).
float
Angle oriented (anti-clockwise). Default value: 0.
boolean
Draw inscribed circle or not. Default value is false.
string
Style of rendering. See the getPathPaintOperator() function for more information.
array
Line style of polygon sides. Array with keys among the following:
If a key is not present or is null, not draws the side. Default value is default line style (empty array).
array
Fill color. Format: array(red, green, blue). Default value: default color (empty array).
string
Style of rendering of inscribed circle (if draws). Possible values are:
array
Line style of inscribed circle (if draws). Array like for SetLineStyle(). Default value: default line style (empty array).
array
Fill color of inscribed circle (if draws). Format: array(red, green, blue). Default value: default color (empty array).
startLayer(string $name = '',boolean|null $print = true,boolean $view = true,boolean $lock = true)
public | |
---|---|
since | 5.9.102 (2011-07-13) |
string
Layer name (only a-z letters and numbers). Leave empty for automatic name.
boolean|null
Set to TRUE to print this layer, FALSE to not print and NULL to not set this option
boolean
Set to true to view this layer.
boolean
If true lock the layer
startPage(string $orientation = '',mixed $format = '',boolean $tocpage = false)
The origin of the coordinate system is at the top-left corner and increasing ordinates go downwards.
since | 4.2.010 (2008-11-14) |
---|---|
see | \AddPage(), endPage(), addTOCPage(), endTOCPage(), getPageSizeFromFormat(), setPageFormat() |
public | |
string
page orientation. Possible values are (case insensitive):
mixed
The format used for pages. It can be either: one of the string values specified at getPageSizeFromFormat() or an array of parameters specified at setPageFormat().
boolean
if true the page is designated to contain the Table-Of-Content.
startPageGroup(integer|null $page = null)
NOTE: call this function before calling AddPage()
public | |
---|---|
since | 3.0.000 (2008-03-27) |
integer|null
starting group page (leave empty for next page).
startSVGElementHandler(resource|string $parser,string $name,array $attribs,array $ctm = array())
author | Nicola Asuni |
---|---|
since | 5.0.000 (2010-05-02) |
protected | |
resource|string
The first parameter, parser, is a reference to the XML parser calling the handler.
string
The second parameter, name, contains the name of the element for which this handler is called. If case-folding is in effect for this parser, the element name will be in uppercase letters.
array
The third parameter, attribs, contains an associative array with the element's attributes (if any). The keys of this array are the attribute names, the values are the attribute values. Attribute names are case-folded on the same criteria as element names. Attribute values are not case-folded. The original order of the attributes can be retrieved by walking through attribs the normal way, using each(). The first key in the array was the first attribute, and so on.
array
tranformation matrix for clipping mode (starting transformation matrix).
startTemplate(integer $w,integer $h,mixed $group = false): string|false
An XObject Template is a PDF block that is a self-contained description of any sequence of graphics objects (including path objects, text objects, and sampled images). An XObject Template may be painted multiple times, either on several pages or at several locations on the same page and produces the same results each time, subject only to the graphics state at the time it is invoked. Note: X,Y coordinates will be reset to 0,0.
author | Nicola Asuni |
---|---|
public | |
since | 5.8.017 (2010-08-24) |
see | \endTemplate(), printTemplate() |
integer
Template width in user units (empty string or zero = page width less margins).
integer
Template height in user units (empty string or zero = page height less margins).
mixed
Set transparency group. Can be a boolean value or an array specifying optional parameters: 'CS' (solour space name), 'I' (boolean flag to indicate isolated group) and 'K' (boolean flag to indicate knockout group).
string|false
the XObject Template ID in case of success or false in case of error.
startTransaction()
public | |
---|---|
since | 4.5.029 (2009-03-19) |
StartTransform()
This function must be called before scaling, mirroring, translation, rotation and skewing. Use StartTransform() before, and StopTransform() after the transformations to restore the normal behavior.
public | |
---|---|
since | 2.1.000 (2008-01-07) |
see | \StartTransform(), StopTransform() |
StopTransform()
This function must be called after scaling, mirroring, translation, rotation and skewing. Use StartTransform() before, and StopTransform() after the transformations to restore the normal behavior.
public | |
---|---|
since | 2.1.000 (2008-01-07) |
see | \StartTransform(), StopTransform() |
stringLeftTrim(string $str,string $replace = ''): string
author | Nicola Asuni |
---|---|
public | |
since | 5.8.000 (2010-08-11) |
string
string to trim
string
string that replace spaces.
string
left trimmed string
stringRightTrim(string $str,string $replace = ''): string
author | Nicola Asuni |
---|---|
public | |
since | 5.8.000 (2010-08-11) |
string
string to trim
string
string that replace spaces.
string
right trimmed string
stringTrim(string $str,string $replace = ''): string
author | Nicola Asuni |
---|---|
public | |
since | 5.8.000 (2010-08-11) |
string
string to trim
string
string that replace spaces.
string
trimmed string
SVGPath(string $d,string $style = ''): array
author | Nicola Asuni |
---|---|
since | 5.0.000 (2010-05-02) |
protected |
string
attribute d of the path SVG element
string
Style of rendering. Possible values are:
array
of container box measures (x, y, w, h)
SVGTransform(array $tm)
protected | |
---|---|
since | 5.0.000 (2010-05-02) |
array
original SVG transformation matrix
swapMargins(boolean $reverse = true)
protected | |
---|---|
since | 4.2.000 (2008-10-29) |
boolean
if true swap left and right margins.
Text(float $x,float $y,string $txt,integer $fstroke,boolean $fclip = false,boolean $ffill = true,mixed $border,integer $ln,string $align = '',boolean $fill = false,mixed $link = '',integer $stretch,boolean $ignore_min_height = false,string $calign = 'T',string $valign = 'M',boolean $rtloff = false)
This method allows to place a string precisely on the page.
public | |
---|---|
since | 1.0 |
see | \Cell(), Write(), MultiCell(), WriteHTML(), WriteHTMLCell() |
float
Abscissa of the cell origin
float
Ordinate of the cell origin
string
String to print
integer
outline size in user units (0 = disable)
boolean
if true activate clipping mode (you must call StartTransform() before this function and StopTransform() to stop the clipping tranformation).
boolean
if true fills the text
mixed
Indicates if borders must be drawn around the cell. The value can be a number:
integer
Indicates where the current position should go after the call. Possible values are:
string
Allows to center or align the text. Possible values are:
boolean
Indicates if the cell background must be painted (true) or transparent (false).
mixed
URL or identifier returned by AddLink().
integer
font stretch mode:
boolean
if true ignore automatic minimum height value.
string
cell vertical alignment relative to the specified Y value. Possible values are:
string
text vertical alignment inside the cell. Possible values are:
boolean
if true uses the page top-left corner as origin of axis for $x and $y initial position.
TextField(string $name,float $w,float $h,array $prop = array(),array $opt = array(),float|null $x = null,float|null $y = null,boolean $js = false)
public | |
---|---|
author | Nicola Asuni |
since | 4.8.000 (2009-09-07) |
string
field name
float
Width of the rectangle
float
Height of the rectangle
array
javascript field properties. Possible values are described on official Javascript for Acrobat API reference.
array
annotation parameters. Possible values are described on official PDF32000_2008 reference.
float|null
Abscissa of the upper-left corner of the rectangle
float|null
Ordinate of the upper-left corner of the rectangle
boolean
if true put the field using JavaScript (requires Acrobat Writer to be rendered).
Transform(array $tm)
protected | |
---|---|
since | 2.1.000 (2008-01-07) |
see | \StartTransform(), StopTransform() |
array
transformation matrix
Translate(integer $t_x,integer $t_y)
public | |
---|---|
since | 2.1.000 (2008-01-07) |
see | \StartTransform(), StopTransform() |
integer
movement to the right
integer
movement to the bottom
TranslateX(integer $t_x)
public | |
---|---|
since | 2.1.000 (2008-01-07) |
see | \StartTransform(), StopTransform() |
integer
movement to the right (or left for RTL)
TranslateY(integer $t_y)
public | |
---|---|
since | 2.1.000 (2008-01-07) |
see | \StartTransform(), StopTransform() |
integer
movement to the bottom
unhtmlentities(string $text_to_convert): string
Convert entities in UTF-8.
public |
---|
string
Text to convert.
string
converted text string
unserializeTCPDFtagParameters(string $data): array
protected | static |
---|
string
serialized data
array
containing unserialized data
Write(float $h,string $txt,mixed $link = '',boolean $fill = false,string $align = '',boolean $ln = false,integer $stretch,boolean $firstline = false,boolean $firstblock = false,float $maxh,float $wadj,array|null $margin = null): mixed
public | |
---|---|
since | 1.5 |
float
Line height
string
String to print
mixed
URL or identifier returned by AddLink()
boolean
Indicates if the cell background must be painted (true) or transparent (false).
string
Allows to center or align the text. Possible values are:
boolean
if true set cursor at the bottom of the line, otherwise set cursor at the top of the line.
integer
font stretch mode:
boolean
if true prints only the first line and return the remaining string.
boolean
if true the string is the starting of a line.
float
maximum height. It should be >= $h and less then remaining space to the bottom of the page, or 0 for disable this feature.
float
first line width will be reduced by this amount (used in HTML mode).
array|null
margin array of the parent container
mixed
Return the number of cells or the remaining string if $firstline = true.
write1DBarcode(string $code,string $type,float|null $x = null,float|null $y = null,float|null $w = null,float|null $h = null,float|null $xres = null,array $style = array(),string $align = '')
author | Nicola Asuni |
---|---|
since | 3.1.000 (2008-06-09) |
public | |
string
code to print
string
type of barcode (see tcpdf_barcodes_1d.php for supported formats).
float|null
x position in user units (null = current x position)
float|null
y position in user units (null = current y position)
float|null
width in user units (null = remaining page width)
float|null
height in user units (null = remaining page height)
float|null
width of the smallest bar in user units (null = default value = 0.4mm)
array
array of options:
string
Indicates the alignment of the pointer next to barcode insertion relative to barcode height. The value can be:
write2DBarcode(string $code,string $type,float|null $x = null,float|null $y = null,float|null $w = null,float|null $h = null,array $style = array(),string $align = '',boolean $distort = false)
author | Nicola Asuni |
---|---|
since | 4.5.037 (2009-04-07) |
public | |
string
code to print
string
type of barcode (see tcpdf_barcodes_2d.php for supported formats).
float|null
x position in user units
float|null
y position in user units
float|null
width in user units
float|null
height in user units
array
array of options:
string
Indicates the alignment of the pointer next to barcode insertion relative to barcode height. The value can be:
boolean
if true distort the barcode to fit width and height, otherwise preserve aspect ratio
writeHTML(string $html,boolean $ln = true,boolean $fill = false,boolean $reseth = false,boolean $cell = false,string $align = '')
Supported tags are: a, b, blockquote, br, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, img, li, ol, p, pre, small, span, strong, sub, sup, table, tcpdf, td, th, thead, tr, tt, u, ul NOTE: all the HTML attributes must be enclosed in double-quote.
public | |
---|---|
string
text to display
boolean
if true add a new line after text (default = true)
boolean
Indicates if the background must be painted (true) or transparent (false).
boolean
if true reset the last cell height (default false).
boolean
if true add the current left (or right for RTL) padding to each Write (default false).
string
Allows to center or align the text. Possible values are:
writeHTMLCell(float $w,float $h,float|null $x,float|null $y,string $html = '',mixed $border,integer $ln,boolean $fill = false,boolean $reseth = true,string $align = '',boolean $autopadding = true)
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.
IMPORTANT: The HTML must be well formatted - try to clean-up it using an application like HTML-Tidy before submitting.
Supported tags are: a, b, blockquote, br, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, img, li, ol, p, pre, small, span, strong, sub, sup, table, tcpdf, td, th, thead, tr, tt, u, ul
NOTE: all the HTML attributes must be enclosed in double-quote.
see | \Multicell(), writeHTML() |
---|---|
public | |
float
Cell width. If 0, the cell extends up to the right margin.
float
Cell minimum height. The cell extends automatically if needed.
float|null
upper-left corner X coordinate
float|null
upper-left corner Y coordinate
string
html text to print. Default value: empty string.
mixed
Indicates if borders must be drawn around the cell. The value can be a number:
integer
Indicates where the current position should go after the call. Possible values are:
boolean
Indicates if the cell background must be painted (true) or transparent (false).
boolean
if true reset the last cell height (default true).
string
Allows to center or align the text. Possible values are:
boolean
if true, uses internal padding and automatically adjust it to account for line width.
page :
protected | |
---|---|
n :
protected | |
---|---|
offsets :
protected | |
---|---|
pageobjects :
protected | |
---|---|
buffer :
protected | |
---|---|
pages :
protected | |
---|---|
state :
protected | |
---|---|
compress :
protected | |
---|---|
CurOrientation :
protected | |
---|---|
pagedim :
protected | |
---|---|
k :
protected | |
---|---|
fwPt :
protected | |
---|---|
fhPt :
protected | |
---|---|
wPt :
protected | |
---|---|
hPt :
protected | |
---|---|
w :
protected | |
---|---|
h :
protected | |
---|---|
lMargin :
protected | |
---|---|
rMargin :
protected | |
---|---|
clMargin :
protected | |
---|---|
crMargin :
protected | |
---|---|
tMargin :
protected | |
---|---|
bMargin :
protected | |
---|---|
cell_padding :
since | (2010-10-03) |
---|---|
protected | |
cell_margin :
since | (2010-10-04) |
---|---|
protected | |
x :
protected | |
---|---|
y :
protected | |
---|---|
lasth :
protected | |
---|---|
LineWidth :
protected | |
---|---|
CoreFonts :
protected | |
---|---|
fonts :
protected | |
---|---|
FontFiles :
protected | |
---|---|
diffs :
protected | |
---|---|
images :
protected | |
---|---|
svg_tag_depth :
protected | |
---|---|
PageAnnots :
protected | |
---|---|
links :
protected | |
---|---|
FontFamily :
protected | |
---|---|
FontStyle :
protected | |
---|---|
FontAscent :
protected | |
---|---|
since | (2007-03-29) |
FontDescent :
protected | |
---|---|
since | (2007-03-29) |
underline :
protected | |
---|---|
overline :
protected | |
---|---|
CurrentFont :
protected | |
---|---|
FontSizePt :
protected | |
---|---|
FontSize :
protected | |
---|---|
DrawColor :
protected | |
---|---|
FillColor :
protected | |
---|---|
TextColor :
protected | |
---|---|
ColorFlag :
protected | |
---|---|
AutoPageBreak :
protected | |
---|---|
PageBreakTrigger :
protected | |
---|---|
InHeader :
protected | |
---|---|
ZoomMode :
protected | |
---|---|
LayoutMode :
protected | |
---|---|
docinfounicode :
protected | |
---|---|
title :
protected | |
---|---|
subject :
protected | |
---|---|
keywords :
protected | |
---|---|
creator :
protected | |
---|---|
starting_page_number :
protected | |
---|---|
img_rb_x :
since | |
---|---|
author | Nicola Asuni |
protected | |
img_rb_y :
since | |
---|---|
author | Nicola Asuni |
protected | |
imgscale :
since | |
---|---|
author | Nicola Asuni |
protected | |
isunicode :
since | |
---|---|
author | Nicola Asuni |
protected | |
PDFVersion :
since | |
---|---|
protected | |
header_xobjid :
protected | |
---|---|
header_xobj_autoreset :
protected | |
---|---|
header_margin :
protected | |
---|---|
original_lMargin :
protected | |
---|---|
since | |
original_rMargin :
protected | |
---|---|
since | |
header_font :\array<int,string|float|\null>
protected | |
---|---|
var | |
phpstan-var | array{0: string, 1: string, 2: float|null} |
\array
l :
protected | |
---|---|
print_header :
protected | |
---|---|
header_logo :
protected | |
---|---|
header_logo_width :
protected | |
---|---|
header_title :
protected | |
---|---|
header_string :
protected | |
---|---|
header_text_color :array<mixed,integer>
since | (2012-07-25) |
---|---|
protected | |
var | |
phpstan-var | array{0: int, 1: int, 2: int} |
array<mixed,integer>
header_line_color :array<mixed,integer>
since | (2012-07-25) |
---|---|
protected | |
var | |
phpstan-var | array{0: int, 1: int, 2: int} |
array<mixed,integer>
txtshadow :
since | (2012-07-25) |
---|---|
protected | |
default_table_columns :
protected | |
---|---|
HREF :
protected | |
---|---|
fontlist :
protected | |
---|---|
fgcolor :
protected | |
---|---|
listordered :
protected | |
---|---|
listcount :
protected | |
---|---|
listnum :
protected | |
---|---|
listindent :
protected | |
---|---|
listindentlevel :
protected | |
---|---|
bgcolor :
protected | |
---|---|
tempfontsize :
protected | |
---|---|
lispacer :
protected | |
---|---|
encoding :
protected | |
---|---|
since | |
rtl :
protected | |
---|---|
since | |
tmprtl :
protected | |
---|---|
since | |
encrypted :
protected | |
---|---|
since | (2008-01-02) |
encryptdata :
protected | |
---|---|
since | (2010-05-11) |
last_enc_key :
protected | |
---|---|
since | (2008-01-02) |
last_enc_key_c :
protected | |
---|---|
since | (2008-01-02) |
file_id :
protected | |
---|---|
since | (2010-05-12) |
outlines :
protected | |
---|---|
since | (2008-02-12) |
OutlineRoot :
protected | |
---|---|
since | (2008-02-12) |
javascript :
protected | |
---|---|
since | (2008-02-12) |
n_js :
protected | |
---|---|
since | (2008-02-12) |
linethrough :
protected | |
---|---|
since | (2008-03-19) |
ur :
protected | |
---|---|
since | (2010-08-23) |
dpi :
protected | |
---|---|
since | (2008-03-27) |
newpagegroup :
protected | |
---|---|
since | (2008-03-27) |
pagegroups :
protected | |
---|---|
since | (2008-03-27) |
currpagegroup :
protected | |
---|---|
since | (2008-03-27) |
extgstates :
protected | |
---|---|
since | (2008-03-27) |
jpeg_quality :
protected | |
---|---|
since | (2008-03-27) |
cell_height_ratio :float
protected | |
---|---|
since | (2008-05-23) |
var |
float
viewer_preferences :
protected | |
---|---|
since | (2008-06-09) |
PageMode :
protected | |
---|---|
since | (2008-06-09) |
gradients :
protected | |
---|---|
since | (2008-06-09) |
intmrk :
protected | |
---|---|
since | (2008-06-26) |
bordermrk :
protected | |
---|---|
since | (2010-08-03) |
emptypagemrk :
protected | |
---|---|
since | (2010-08-18) |
cntmrk :
protected | |
---|---|
since | (2009-07-20) |
newline :
protected | |
---|---|
since | (2008-07-01) |
endlinex :
protected | |
---|---|
since | (2008-07-01) |
linestyleWidth :
protected | |
---|---|
since | (2008-07-16) |
linestyleCap :
protected | |
---|---|
since | (2008-07-16) |
linestyleJoin :
protected | |
---|---|
since | (2008-07-16) |
linestyleDash :
protected | |
---|---|
since | (2008-07-16) |
openMarkedContent :
protected | |
---|---|
since | (2008-07-28) |
htmlvspace :
protected | |
---|---|
since | (2008-08-24) |
spot_colors :
protected | |
---|---|
since | (2008-09-12) |
lisymbol :
protected | |
---|---|
since | (2008-09-26) |
epsmarker :
protected | |
---|---|
since | (2008-10-18) |
transfmatrix :
protected | |
---|---|
since | (2008-10-29) |
transfmatrix_key :
protected | |
---|---|
since | (2009-09-17) |
booklet :
protected | |
---|---|
since | (2008-10-29) |
feps :
protected | |
---|---|
since | (2008-10-29) |
tagvspaces :
protected | |
---|---|
since | (2008-10-30) |
customlistindent :
protected | |
---|---|
since | (2008-11-12) |
opencell :
protected | |
---|---|
since | (2008-11-14) |
premode :
protected | |
---|---|
since | (2008-12-08) |
transfmrk :
keys are the page numbers
protected | |
---|---|
since | (2008-12-09) |
htmlLinkColorArray :
protected | |
---|---|
since | (2008-12-09) |
htmlLinkFontStyle :
protected | |
---|---|
since | (2008-12-09) |
numpages :
protected | |
---|---|
since | (2008-12-31) |
pagelen :
protected | |
---|---|
since | (2008-12-31) |
numimages :
protected | |
---|---|
since | (2008-12-31) |
imagekeys :
protected | |
---|---|
since | (2008-12-31) |
bufferlen :
protected | |
---|---|
since | (2008-12-31) |
numfonts :
protected | |
---|---|
since | (2009-01-02) |
fontkeys :
protected | |
---|---|
since | (2009-01-02) |
font_obj_ids :
protected | |
---|---|
since | (2009-09-09) |
pageopen :
protected | |
---|---|
since | (2009-01-02) |
default_monospaced_font :
protected | |
---|---|
since | (2009-03-10) |
objcopy :
protected | |
---|---|
since | (2009-03-19) |
cache_file_length :
protected | |
---|---|
since | (2009-03-19) |
thead :
protected | |
---|---|
since | (2009-03-20) |
theadMargins :
protected | |
---|---|
since | (2009-03-20) |
sign :
protected | |
---|---|
since | (2009-04-24) |
signature_data :
protected | |
---|---|
since | (2009-04-24) |
signature_max_length :
protected | |
---|---|
since | (2009-04-24) |
signature_appearance :
protected | |
---|---|
since | (2010-06-16) |
empty_signature_appearance :
protected | |
---|---|
since | (2011-07-06) |
tsa_data :
protected | |
---|---|
since | (2014-06-19) |
re_spaces :
protected | |
---|---|
since | (2009-04-28) |
re_space :
protected | |
---|---|
since | (2010-07-09) |
sig_obj_id :
protected | |
---|---|
since | (2009-06-23) |
page_obj_id :
protected | |
---|---|
since | (2009-08-29) |
form_obj_id :
protected | |
---|---|
since | (2009-09-07) |
default_form_prop :
protected | |
---|---|
since | (2009-09-07) |
js_objects :
protected | |
---|---|
since | (2009-09-07) |
form_action :
protected | |
---|---|
since | (2009-09-07) |
form_enctype :
protected | |
---|---|
since | (2009-09-07) |
form_mode :
protected | |
---|---|
since | (2009-09-07) |
annotation_fonts :
protected | |
---|---|
since | (2009-09-09) |
radio_groups :
protected | |
---|---|
since | (2009-09-09) |
textindent :
protected | |
---|---|
since | (2009-09-23) |
start_transaction_page :
protected | |
---|---|
since | (2009-09-23) |
start_transaction_y :
protected | |
---|---|
since | (2010-03-28) |
inthead :
protected | |
---|---|
since | (2010-01-25) |
columns :
protected | |
---|---|
since | (2010-03-28) |
num_columns :
protected | |
---|---|
since | (2010-03-28) |
current_column :
protected | |
---|---|
since | (2010-03-28) |
column_start_page :
protected | |
---|---|
since | (2010-03-28) |
maxselcol :
protected | |
---|---|
since | (2010-08-11) |
colxshift :
protected | |
---|---|
since | (2010-08-11) |
textrendermode :
protected | |
---|---|
since | (2010-04-03) |
textstrokewidth :
protected | |
---|---|
since | (2010-04-03) |
strokecolor :
protected | |
---|---|
since | (2010-04-03) |
pdfunit :
protected | |
---|---|
since | (2010-04-22) |
tocpage :
protected | |
---|---|
rasterize_vector_images :
protected | |
---|---|
since | (2010-04-26) |
font_subsetting :
protected | |
---|---|
since | (2010-06-07) |
default_graphic_vars :
protected | |
---|---|
since | (2010-07-02) |
xobjects :
protected | |
---|---|
since | (2010-08-23) |
inxobj :
protected | |
---|---|
since | (2010-08-24) |
xobjid :
protected | |
---|---|
since | (2010-08-24) |
font_stretching :
protected | |
---|---|
since | (2010-09-29) |
font_spacing :
protected | |
---|---|
since | (2010-09-29) |
page_regions :
('page' => page number or empy for current page, 'xt' => X top, 'yt' => Y top, 'xb' => X bottom, 'yb' => Y bottom, 'side' => page side 'L' = left or 'R' = right)
protected | |
---|---|
since | (2010-10-14) |
check_page_regions :
protected | |
---|---|
pdflayers :
protected | |
---|---|
since | (2011-07-13) |
dests :
protected | |
---|---|
since | (2011-06-23) |
n_dests :
protected | |
---|---|
since | (2011-06-23) |
efnames :
protected | |
---|---|
since | (2013-01-23) |
svgdir :
protected | |
---|---|
since | (2010-05-05) |
svgunit :
protected | |
---|---|
since | (2010-05-02) |
svggradients :
protected | |
---|---|
since | (2010-05-02) |
svggradientid :
protected | |
---|---|
since | (2010-05-02) |
svgdefsmode :
protected | |
---|---|
since | (2010-05-02) |
svgdefs :
protected | |
---|---|
since | (2010-05-02) |
svgclipmode :
protected | |
---|---|
since | (2010-04-26) |
svgclippaths :
protected | |
---|---|
since | (2010-05-02) |
svgcliptm :
protected | |
---|---|
since | (2010-08-31) |
svgclipid :
protected | |
---|---|
since | (2010-05-02) |
svgtext :
protected | |
---|---|
since | (2010-05-02) |
svgtextmode :
protected | |
---|---|
since | (2010-08-23) |
svgstyles :
protected | |
---|---|
since | (2010-05-02) |
force_srgb :
protected | |
---|---|
since | (2011-09-28) |
pdfa_mode :
protected | |
---|---|
since | (2011-09-27) |
pdfa_version :
protected | |
---|---|
since | (2019-03-12) |
custom_xmp :
protected | |
---|---|
since | (2011-10-06) |
custom_xmp_rdf :
protected | |
---|---|
since | (2019-09-19) |
overprint :\array<string,bool|\int>
(Check the "Entries in a Graphics State Parameter Dictionary" on PDF 32000-1:2008).
protected | |
---|---|
since | (2012-03-23) |
var |
\array
alpha :
(Check the "Entries in a Graphics State Parameter Dictionary" on PDF 32000-1:2008).
protected | |
---|---|
since | (2012-03-23) |
page_boxes :
protected | |
---|---|
since | (2012-03-23) |
tcpdflink :
protected | |
---|---|
since | (2012-03-23) |
gdgammacache :
protected | |
---|---|
since | (2012-06-05) |
fileContentCache :array
protected | |
---|---|
var | |
since | (2020-09-28) |
array
allowLocalFiles :boolean
var | |
---|---|
protected | |
since | (2020-07-23) |
boolean
cleaned_ids :