ILIAS
eassessment Revision 61809
|
Public Member Functions | |
__construct ($orientation='P', $unit='mm', $format='A4', $unicode=true, $encoding='UTF-8', $diskcache=false) | |
This is the class constructor. | |
__destruct () | |
Default destructor. | |
setPageUnit ($unit) | |
Set the units of measure for the document. | |
getPageSizeFromFormat ($format) | |
Get page dimensions from format name. | |
setPageBoxes ($page, $type, $llx, $lly, $urx, $ury, $points=false) | |
Set page boundaries. | |
setPageOrientation ($orientation, $autopagebreak='', $bottommargin='') | |
Set page orientation. | |
setSpacesRE ($re='/[^\S\xa0]/') | |
Set regular expression to detect withespaces or word separators. | |
setRTL ($enable, $resetx=true) | |
Enable or disable Right-To-Left language mode. | |
getRTL () | |
Return the RTL status. | |
setTempRTL ($mode) | |
Force temporary RTL language direction. | |
isRTLTextDir () | |
Return the current temporary RTL status. | |
setLastH ($h) | |
Set the last cell height. | |
resetLastH () | |
Reset the last cell height. | |
getLastH () | |
Get the last cell height. | |
setImageScale ($scale) | |
Set the adjusting factor to convert pixels to user units. | |
getImageScale () | |
Returns the adjusting factor to convert pixels to user units. | |
getPageDimensions ($pagenum='') | |
Returns an array of page dimensions: | |
getPageWidth ($pagenum='') | |
Returns the page width in units. | |
getPageHeight ($pagenum='') | |
Returns the page height in units. | |
getBreakMargin ($pagenum='') | |
Returns the page break margin. | |
getScaleFactor () | |
Returns the scale factor (number of points in user unit). | |
SetMargins ($left, $top, $right=-1, $keepmargins=false) | |
Defines the left, top and right margins. | |
SetLeftMargin ($margin) | |
Defines the left margin. | |
SetTopMargin ($margin) | |
Defines the top margin. | |
SetRightMargin ($margin) | |
Defines the right margin. | |
SetCellPadding ($pad) | |
Set the same internal Cell padding for top, right, bottom, left-. | |
setCellPaddings ($left='', $top='', $right='', $bottom='') | |
Set the internal Cell paddings. | |
getCellPaddings () | |
Get the internal Cell padding array. | |
setCellMargins ($left='', $top='', $right='', $bottom='') | |
Set the internal Cell margins. | |
getCellMargins () | |
Get the internal Cell margin array. | |
SetAutoPageBreak ($auto, $margin=0) | |
Enables or disables the automatic page breaking mode. | |
SetDisplayMode ($zoom, $layout='SinglePage', $mode='UseNone') | |
Defines the way the document is to be displayed by the viewer. | |
SetCompression ($compress) | |
Activates or deactivates page compression. | |
SetTitle ($title) | |
Defines the title of the document. | |
SetSubject ($subject) | |
Defines the subject of the document. | |
SetAuthor ($author) | |
Defines the author of the document. | |
SetKeywords ($keywords) | |
Associates keywords with the document, generally in the form 'keyword1 keyword2 ...'. | |
SetCreator ($creator) | |
Defines the creator of the document. | |
Error ($msg) | |
This method is automatically called in case of fatal error; it simply outputs the message and halts the execution. | |
Open () | |
This method begins the generation of the PDF document. | |
Close () | |
Terminates the PDF document. | |
setPage ($pnum, $resetmargins=false) | |
Move pointer at the specified document page and update page dimensions. | |
lastPage ($resetmargins=false) | |
Reset pointer to the last document page. | |
getPage () | |
Get current document page number. | |
getNumPages () | |
Get the total number of insered pages. | |
addTOCPage ($orientation='', $format='', $keepmargins=false) | |
Adds a new TOC (Table Of Content) page to the document. | |
endTOCPage () | |
Terminate the current TOC (Table Of Content) page public. | |
AddPage ($orientation='', $format='', $keepmargins=false, $tocpage=false) | |
Adds a new page to the document. | |
endPage ($tocpage=false) | |
Terminate the current page. | |
startPage ($orientation='', $format='', $tocpage=false) | |
Starts a new page to the document. | |
setPageMark () | |
Set start-writing mark on current page stream used to put borders and fills. | |
setHeaderData ($ln='', $lw=0, $ht='', $hs='') | |
Set header data. | |
getHeaderData () | |
Returns header data: | |
setHeaderMargin ($hm=10) | |
Set header margin. | |
getHeaderMargin () | |
Returns header margin in user units. | |
setFooterMargin ($fm=10) | |
Set footer margin. | |
getFooterMargin () | |
Returns footer margin in user units. | |
setPrintHeader ($val=true) | |
Set a flag to print page header. | |
setPrintFooter ($val=true) | |
Set a flag to print page footer. | |
getImageRBX () | |
Return the right-bottom (or left-bottom for RTL) corner X coordinate of last inserted image. | |
getImageRBY () | |
Return the right-bottom (or left-bottom for RTL) corner Y coordinate of last inserted image. | |
Header () | |
This method is used to render the page header. | |
Footer () | |
This method is used to render the page footer. | |
PageNo () | |
Returns the current page number. | |
AddSpotColor ($name, $c, $m, $y, $k) | |
Defines a new spot color. | |
SetDrawColorArray ($color, $ret=false) | |
Defines the color used for all drawing operations (lines, rectangles and cell borders). | |
SetDrawColor ($col1=0, $col2=-1, $col3=-1, $col4=-1, $ret=false) | |
Defines the color used for all drawing operations (lines, rectangles and cell borders). | |
SetDrawSpotColor ($name, $tint=100) | |
Defines the spot color used for all drawing operations (lines, rectangles and cell borders). | |
SetFillColorArray ($color) | |
Defines the color used for all filling operations (filled rectangles and cell backgrounds). | |
SetFillColor ($col1=0, $col2=-1, $col3=-1, $col4=-1) | |
Defines the color used for all filling operations (filled rectangles and cell backgrounds). | |
SetFillSpotColor ($name, $tint=100) | |
Defines the spot color used for all filling operations (filled rectangles and cell backgrounds). | |
SetTextColorArray ($color) | |
Defines the color used for text. | |
SetTextColor ($col1=0, $col2=-1, $col3=-1, $col4=-1) | |
Defines the color used for text. | |
SetTextSpotColor ($name, $tint=100) | |
Defines the spot color used for text. | |
GetStringWidth ($s, $fontname='', $fontstyle='', $fontsize=0, $getarray=false) | |
Returns the length of a string in user unit. | |
GetArrStringWidth ($sa, $fontname='', $fontstyle='', $fontsize=0, $getarray=false) | |
Returns the string length of an array of chars in user unit or an array of characters widths. | |
GetCharWidth ($char, $notlast=true) | |
Returns the length of the char in user unit for the current font considering current stretching and spacing (tracking/kerning). | |
getRawCharWidth ($char) | |
Returns the length of the char in user unit for the current font. | |
GetNumChars ($s) | |
Returns the numbero of characters in a string. | |
AddFont ($family, $style='', $fontfile='', $subset='default') | |
Imports a TrueType, Type1, core, or CID0 font and makes it available. | |
SetFont ($family, $style='', $size=0, $fontfile='', $subset='default') | |
Sets the font used to print character strings. | |
SetFontSize ($size, $out=true) | |
Defines the size of the current font. | |
getFontDescent ($font, $style='', $size=0) | |
Return the font descent value. | |
getFontAscent ($font, $style='', $size=0) | |
Return the font ascent value. | |
SetDefaultMonospacedFont ($font) | |
Defines the default monospaced font. | |
AddLink () | |
Creates a new internal link and returns its identifier. | |
SetLink ($link, $y=0, $page=-1) | |
Defines the page and position a link points to. | |
Link ($x, $y, $w, $h, $link, $spaces=0) | |
Puts a link on a rectangular area of the page. | |
Annotation ($x, $y, $w, $h, $text, $opt=array('Subtype'=>'Text'), $spaces=0) | |
Puts a markup annotation on a rectangular area of the page. | |
Text ($x, $y, $txt, $fstroke=false, $fclip=false, $ffill=true, $border=0, $ln=0, $align='', $fill=false, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M', $rtloff=false) | |
Prints a text cell at the specified position. | |
AcceptPageBreak () | |
Whenever a page break condition is met, the method is called, and the break is issued or not depending on the returned value. | |
removeSHY ($txt='') | |
Removes SHY characters from text. | |
Cell ($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M') | |
Prints a cell (rectangular area) with optional borders, background color and character string. | |
MultiCell ($w, $h, $txt, $border=0, $align='J', $fill=false, $ln=1, $x='', $y='', $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0, $valign='T', $fitcell=false) | |
This method allows printing text with line breaks. | |
getNumLines ($txt, $w=0, $reseth=false, $autopadding=true, $cellpadding='', $border=0) | |
This method return the estimated number of lines for print a simple text string using Multicell() method. | |
getStringHeight ($w, $txt, $reseth=false, $autopadding=true, $cellpadding='', $border=0) | |
This method return the estimated needed height for print a simple text string in Multicell() method. | |
Write ($h, $txt, $link='', $fill=false, $align='', $ln=false, $stretch=0, $firstline=false, $firstblock=false, $maxh=0, $wadj=0, $margin='') | |
This method prints text from the current position. | |
UTF8ArrSubString ($strarr, $start='', $end='') | |
Extract a slice of the $strarr array and return it as string. | |
UniArrSubString ($uniarr, $start='', $end='') | |
Extract a slice of the $uniarr array and return it as string. | |
UTF8ArrayToUniArray ($ta) | |
Convert an array of UTF8 values to array of unicode characters. | |
unichr ($c) | |
Returns the unicode caracter specified by UTF-8 value. | |
getImageFileType ($imgfile, $iminfo=array()) | |
Return the image type given the file name or array returned by getimagesize() function. | |
Image ($file, $x='', $y='', $w=0, $h=0, $type='', $link='', $align='', $resize=false, $dpi=300, $palign='', $ismask=false, $imgmask=false, $border=0, $fitbox=false, $hidden=false, $fitonpage=false) | |
Puts an image in the page. | |
set_mqr ($mqr) | |
Sets the current active configuration setting of magic_quotes_runtime (if the set_magic_quotes_runtime function exist) | |
get_mqr () | |
Gets the current active configuration setting of magic_quotes_runtime (if the get_magic_quotes_runtime function exist) | |
Ln ($h='', $cell=false) | |
Performs a line break. | |
GetX () | |
Returns the relative X value of current position. | |
GetAbsX () | |
Returns the absolute X value of current position. | |
GetY () | |
Returns the ordinate of the current position. | |
SetX ($x, $rtloff=false) | |
Defines the abscissa of the current position. | |
SetY ($y, $resetx=true, $rtloff=false) | |
Moves the current abscissa back to the left margin and sets the ordinate. | |
SetXY ($x, $y, $rtloff=false) | |
Defines the abscissa and ordinate of the current position. | |
Output ($name='doc.pdf', $dest='I') | |
Send the document to a given destination: string, local file or browser. | |
_destroy ($destroyall=false, $preserve_objcopy=false) | |
Unset all class variables except the following critical variables: internal_encoding, state, bufferlen, buffer and diskcache. | |
setHeaderFont ($font) | |
Set header font. | |
getHeaderFont () | |
Get header font. | |
setFooterFont ($font) | |
Set footer font. | |
getFooterFont () | |
Get Footer font. | |
setLanguageArray ($language) | |
Set language array. | |
getPDFData () | |
Returns the PDF data. | |
addHtmlLink ($url, $name, $fill=false, $firstline=false, $color='', $style=-1, $firstblock=false) | |
Output anchor link. | |
convertHTMLColorToDec ($color='#FFFFFF') | |
Returns an associative array (keys: R,G,B) from an html color name or a six-digit or three-digit hexadecimal color representation (i.e. | |
pixelsToUnits ($px) | |
Converts pixels to User's Units. | |
unhtmlentities ($text_to_convert) | |
Reverse function for htmlentities. | |
SetProtection ($permissions=array('print', 'modify', 'copy', 'annot-forms', 'fill-forms', 'extract', 'assemble', 'print-high'), $user_pass='', $owner_pass=null, $mode=0, $pubkeys=null) | |
Set document protection Remark: the protection against modification is for people who have the full Acrobat product. | |
StartTransform () | |
Starts a 2D tranformation saving current graphic state. | |
StopTransform () | |
Stops a 2D tranformation restoring previous graphic state. | |
ScaleX ($s_x, $x='', $y='') | |
Horizontal Scaling. | |
ScaleY ($s_y, $x='', $y='') | |
Vertical Scaling. | |
ScaleXY ($s, $x='', $y='') | |
Vertical and horizontal proportional Scaling. | |
Scale ($s_x, $s_y, $x='', $y='') | |
Vertical and horizontal non-proportional Scaling. | |
MirrorH ($x='') | |
Horizontal Mirroring. | |
MirrorV ($y='') | |
Verical Mirroring. | |
MirrorP ($x='', $y='') | |
Point reflection mirroring. | |
MirrorL ($angle=0, $x='', $y='') | |
Reflection against a straight line through point (x, y) with the gradient angle (angle). | |
TranslateX ($t_x) | |
Translate graphic object horizontally. | |
TranslateY ($t_y) | |
Translate graphic object vertically. | |
Translate ($t_x, $t_y) | |
Translate graphic object horizontally and vertically. | |
Rotate ($angle, $x='', $y='') | |
Rotate object. | |
SkewX ($angle_x, $x='', $y='') | |
Skew horizontally. | |
SkewY ($angle_y, $x='', $y='') | |
Skew vertically. | |
Skew ($angle_x, $angle_y, $x='', $y='') | |
Skew. | |
SetLineWidth ($width) | |
Defines the line width. | |
GetLineWidth () | |
Returns the current the line width. | |
SetLineStyle ($style, $ret=false) | |
Set line style. | |
Line ($x1, $y1, $x2, $y2, $style=array()) | |
Draws a line between two points. | |
Rect ($x, $y, $w, $h, $style='', $border_style=array(), $fill_color=array()) | |
Draws a rectangle. | |
Curve ($x0, $y0, $x1, $y1, $x2, $y2, $x3, $y3, $style='', $line_style=array(), $fill_color=array()) | |
Draws a Bezier curve. | |
Polycurve ($x0, $y0, $segments, $style='', $line_style=array(), $fill_color=array()) | |
Draws a poly-Bezier curve. | |
Ellipse ($x0, $y0, $rx, $ry='', $angle=0, $astart=0, $afinish=360, $style='', $line_style=array(), $fill_color=array(), $nc=2) | |
Draws an ellipse. | |
Circle ($x0, $y0, $r, $angstr=0, $angend=360, $style='', $line_style=array(), $fill_color=array(), $nc=2) | |
Draws a circle. | |
PolyLine ($p, $style='', $line_style=array(), $fill_color=array()) | |
Draws a polygonal line. | |
Polygon ($p, $style='', $line_style=array(), $fill_color=array(), $closed=true) | |
Draws a polygon. | |
RegularPolygon ($x0, $y0, $r, $ns, $angle=0, $draw_circle=false, $style='', $line_style=array(), $fill_color=array(), $circle_style='', $circle_outLine_style=array(), $circle_fill_color=array()) | |
Draws a regular polygon. | |
StarPolygon ($x0, $y0, $r, $nv, $ng, $angle=0, $draw_circle=false, $style='', $line_style=array(), $fill_color=array(), $circle_style='', $circle_outLine_style=array(), $circle_fill_color=array()) | |
Draws a star polygon. | |
RoundedRect ($x, $y, $w, $h, $r, $round_corner='1111', $style='', $border_style=array(), $fill_color=array()) | |
Draws a rounded rectangle. | |
RoundedRectXY ($x, $y, $w, $h, $rx, $ry, $round_corner='1111', $style='', $border_style=array(), $fill_color=array()) | |
Draws a rounded rectangle. | |
Arrow ($x0, $y0, $x1, $y1, $head_style=0, $arm_size=5, $arm_angle=15) | |
Draws a grahic arrow. | |
Bookmark ($txt, $level=0, $y=-1, $page='') | |
Adds a bookmark. | |
IncludeJS ($script) | |
Adds a javascript. | |
addJavascriptObject ($script, $onload=false) | |
Adds a javascript object and return object ID. | |
setFormDefaultProp ($prop=array()) | |
Set default properties for form fields. | |
getFormDefaultProp () | |
Return the default properties for form fields. | |
TextField ($name, $w, $h, $prop=array(), $opt=array(), $x='', $y='', $js=false) | |
Creates a text field. | |
RadioButton ($name, $w, $prop=array(), $opt=array(), $onvalue='On', $checked=false, $x='', $y='', $js=false) | |
Creates a RadioButton field. | |
ListBox ($name, $w, $h, $values, $prop=array(), $opt=array(), $x='', $y='', $js=false) | |
Creates a List-box field. | |
ComboBox ($name, $w, $h, $values, $prop=array(), $opt=array(), $x='', $y='', $js=false) | |
Creates a Combo-box field. | |
CheckBox ($name, $w, $checked=false, $prop=array(), $opt=array(), $onvalue='Yes', $x='', $y='', $js=false) | |
Creates a CheckBox field. | |
Button ($name, $w, $h, $caption, $action, $prop=array(), $opt=array(), $x='', $y='', $js=false) | |
Creates a button field. | |
setUserRights ($enable=true, $document='/FullSave', $annots='/Create/Delete/Modify/Copy/Import/Export', $form='/Add/Delete/FillIn/Import/Export/SubmitStandalone/SpawnTemplate', $signature='/Modify', $ef='/Create/Delete/Modify/Import', $formex='') | |
Set User's Rights for PDF Reader WARNING: This is experimental and currently do not work. | |
setSignature ($signing_cert='', $private_key='', $private_key_password='', $extracerts='', $cert_type=2, $info=array()) | |
Enable document signature (requires the OpenSSL Library). | |
setSignatureAppearance ($x=0, $y=0, $w=0, $h=0, $page=-1) | |
Set the digital signature appearance (a cliccable rectangle area to get signature properties) | |
startPageGroup ($page='') | |
Create a new page group. | |
AliasNbPages ($alias='{nb}') | |
Defines an alias for the total number of pages. | |
getAliasNbPages () | |
Returns the string alias used for the total number of pages. | |
AliasNumPage ($alias='{pnb}') | |
Defines an alias for the page number. | |
getAliasNumPage () | |
Returns the string alias used for the page number. | |
getGroupPageNo () | |
Return the current page in the group. | |
getGroupPageNoFormatted () | |
Returns the current group page number formatted as a string. | |
getPageGroupAlias () | |
Return the alias of the current page group If the current font is unicode type, the returned string is surrounded by additional curly braces. | |
getPageNumGroupAlias () | |
Return the alias for the page number on the current page group If the current font is unicode type, the returned string is surrounded by additional curly braces. | |
PageNoFormatted () | |
Returns the current page number formatted as a string. | |
setVisibility ($v) | |
Set the visibility of the successive elements. | |
setAlpha ($alpha, $bm='Normal') | |
Set alpha for stroking (CA) and non-stroking (ca) operations. | |
setJPEGQuality ($quality) | |
Set the default JPEG compression quality (1-100) | |
setDefaultTableColumns ($cols=4) | |
Set the default number of columns in a row for HTML tables. | |
setCellHeightRatio ($h) | |
Set the height of the cell (line height) respect the font height. | |
getCellHeightRatio () | |
return the height of cell repect font height. | |
setPDFVersion ($version='1.7') | |
Set the PDF version (check PDF reference for valid values). | |
setViewerPreferences ($preferences) | |
Set the viewer preferences dictionary controlling the way the document is to be presented on the screen or in print. | |
colorRegistrationBar ($x, $y, $w, $h, $transition=true, $vertical=false, $colors='A, R, G, B, C, M, Y, K') | |
Paints color transition registration bars. | |
cropMark ($x, $y, $w, $h, $type='A, B, C, D', $color=array(0, 0, 0)) | |
Paints crop mark. | |
registrationMark ($x, $y, $r, $double=false, $cola=array(0, 0, 0), $colb=array(255, 255, 255)) | |
Paints a registration mark. | |
LinearGradient ($x, $y, $w, $h, $col1=array(), $col2=array(), $coords=array(0, 0, 1, 0)) | |
Paints a linear colour gradient. | |
RadialGradient ($x, $y, $w, $h, $col1=array(), $col2=array(), $coords=array(0.5, 0.5, 0.5, 0.5, 1)) | |
Paints a radial colour gradient. | |
CoonsPatchMesh ($x, $y, $w, $h, $col1=array(), $col2=array(), $col3=array(), $col4=array(), $coords=array(0.00, 0.0, 0.33, 0.00, 0.67, 0.00, 1.00, 0.00, 1.00, 0.33, 1.00, 0.67, 1.00, 1.00, 0.67, 1.00, 0.33, 1.00, 0.00, 1.00, 0.00, 0.67, 0.00, 0.33), $coords_min=0, $coords_max=1, $antialias=false) | |
Paints a coons patch mesh. | |
Gradient ($type, $coords, $stops, $background=array(), $antialias=false) | |
Output gradient. | |
_putshaders () | |
Output gradient shaders. | |
PieSector ($xc, $yc, $r, $a, $b, $style='FD', $cw=true, $o=90) | |
Draw the sector of a circle. | |
PieSectorXY ($xc, $yc, $rx, $ry, $a, $b, $style='FD', $cw=false, $o=0, $nc=2) | |
Draw the sector of an ellipse. | |
ImageEps ($file, $x='', $y='', $w=0, $h=0, $link='', $useBoundingBox=true, $align='', $palign='', $border=0, $fitonpage=false) | |
Embed vector-based Adobe Illustrator (AI) or AI-compatible EPS files. | |
setBarcode ($bc='') | |
Set document barcode. | |
getBarcode () | |
Get current barcode. | |
write1DBarcode ($code, $type, $x='', $y='', $w='', $h='', $xres='', $style='', $align='') | |
Print a Linear Barcode. | |
writeBarcode ($x, $y, $w, $h, $type, $style, $font, $xres, $code) | |
This function is DEPRECATED, please use the new write1DBarcode() function. | |
write2DBarcode ($code, $type, $x='', $y='', $w='', $h='', $style='', $align='', $distort=false) | |
Print 2D Barcode. | |
getMargins () | |
Returns an array containing current margins: | |
getOriginalMargins () | |
Returns an array containing original margins: | |
getFontSize () | |
Returns the current font size. | |
getFontSizePt () | |
Returns the current font size in points unit. | |
getFontFamily () | |
Returns the current font family name. | |
getFontStyle () | |
Returns the current font style. | |
getCSSPadding ($csspadding, $width=0) | |
Get the internal Cell padding from CSS attribute. | |
getCSSMargin ($cssmargin, $width=0) | |
Get the internal Cell margin from CSS attribute. | |
writeHTMLCell ($w, $h, $x, $y, $html='', $border=0, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true) | |
Prints a cell (rectangular area) with optional borders, background color and html text string. | |
writeHTML ($html, $ln=true, $fill=false, $reseth=false, $cell=false, $align='') | |
Allows to preserve some HTML formatting (limited support). | |
setLIsymbol ($symbol='!') | |
Set the default bullet to be used as LI bullet symbol. | |
SetBooklet ($booklet=true, $inner=-1, $outer=-1) | |
Set the booklet mode for double-sided pages. | |
setHtmlVSpace ($tagvs) | |
Set the vertical spaces for HTML tags. | |
setListIndentWidth ($width) | |
Set custom width for list indentation. | |
setOpenCell ($isopen) | |
Set the top/bottom cell sides to be open or closed when the cell cross the page. | |
setHtmlLinksStyle ($color=array(0, 0, 255), $fontstyle='U') | |
Set the color and font style for HTML links. | |
getHTMLUnitToUnits ($htmlval, $refsize=1, $defaultunit='px', $points=false) | |
Convert HTML string containing value and unit of measure to user's units or points. | |
intToRoman ($number) | |
Returns the Roman representation of an integer number. | |
movePage ($frompage, $topage) | |
Move a page to a previous position. | |
deletePage ($page) | |
Remove the specified page. | |
copyPage ($page=0) | |
Clone the specified page to a new page. | |
addTOC ($page='', $numbersfont='', $filler='.', $toc_name='TOC') | |
Output a Table of Content Index (TOC). | |
addHTMLTOC ($page='', $toc_name='TOC', $templates=array(), $correct_align=true) | |
Output a Table Of Content Index (TOC) using HTML templates. | |
startTransaction () | |
Stores a copy of the current TCPDF object used for undo operation. | |
commitTransaction () | |
Delete the copy of the current TCPDF object used for undo operation. | |
rollbackTransaction ($self=false) | |
This method allows to undo the latest transaction by returning the latest saved TCPDF object with startTransaction(). | |
objclone ($object) | |
Creates a copy of a class object. | |
empty_string ($str) | |
Determine whether a string is empty. | |
revstrpos ($haystack, $needle, $offset=0) | |
Find position of last occurrence of a substring in a string. | |
setEqualColumns ($numcols=0, $width=0, $y='') | |
Set multiple columns of the same size. | |
setColumnsArray ($columns) | |
Set columns array. | |
selectColumn ($col='') | |
Set position at a given column. | |
getColumn () | |
Return the current column number. | |
getNumberOfColumns () | |
Return the current number of columns. | |
serializeTCPDFtagParameters ($pararray) | |
Serialize an array of parameters to be used with TCPDF tag in HTML code. | |
setTextRenderingMode ($stroke=0, $fill=true, $clip=false) | |
Set Text rendering mode. | |
getHyphenPatternsFromTEX ($file) | |
Returns an array of hyphenation patterns. | |
hyphenateText ($text, $patterns, $dictionary=array(), $leftmin=1, $rightmin=2, $charmin=1, $charmax=8) | |
Returns text with soft hyphens. | |
setRasterizeVectorImages ($mode) | |
Enable/disable rasterization of vector images using ImageMagick library. | |
setFontSubsetting ($enable=true) | |
Enable or disable default option for font subsetting. | |
getFontSubsetting () | |
Return the default option for font subsetting. | |
stringLeftTrim ($str, $replace='') | |
Left trim the input string. | |
stringRightTrim ($str, $replace='') | |
Right trim the input string. | |
stringTrim ($str, $replace='') | |
Trim the input string. | |
isUnicodeFont () | |
Return true if the current font is unicode type. | |
getFontFamilyName ($fontfamily) | |
Return normalized font name. | |
startTemplate ($w=0, $h=0) | |
Start a new XObject Template. | |
endTemplate () | |
End the current XObject Template started with startTemplate() and restore the previous graphic state. | |
printTemplate ($id, $x='', $y='', $w=0, $h=0, $align='', $palign='', $fitonpage=false) | |
Print an XObject Template. | |
setFontStretching ($perc=100) | |
Set the percentage of character stretching. | |
getFontStretching () | |
Get the percentage of character stretching. | |
setFontSpacing ($spacing=0) | |
Set the amount to increase or decrease the space between characters in a text. | |
getFontSpacing () | |
Get the amount to increase or decrease the space between characters in a text. | |
getPageRegions () | |
Return an array of no-write page regions. | |
setPageRegions ($regions=array()) | |
Set no-write regions on page. | |
addPageRegion ($region) | |
Add a single no-write region on selected page. | |
removePageRegion ($key) | |
Remove a single no-write region. | |
ImageSVG ($file, $x='', $y='', $w=0, $h=0, $link='', $align='', $palign='', $border=0, $fitonpage=false) | |
Embedd a Scalable Vector Graphics (SVG) image. |
Protected Member Functions | |
setPageFormat ($format, $orientation='P') | |
Change the format of the current page. | |
swapPageBoxCoordinates ($page) | |
Swap X and Y coordinates of page boxes (change page boxes orientation). | |
adjustCellPadding ($brd=0) | |
Adjust the internal Cell padding array to take account of the line width. | |
setContentMark ($page=0) | |
Set start-writing mark on selected page. | |
setHeader () | |
This method is used to render the page header. | |
setFooter () | |
This method is used to render the page footer. | |
setTableHeader () | |
This method is used to render the table header on new page (if any). | |
getFontsList () | |
Fill the list of available fonts ($this->fontlist). | |
_putEmbeddedFiles () | |
Embedd the attached files. | |
checkPageBreak ($h=0, $y='', $addpage=true) | |
Add page if needed. | |
getCellCode ($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M') | |
Returns the PDF string code to print a cell (rectangular area) with optional borders, background color and character string. | |
getCellBorder ($x, $y, $w, $h, $brd) | |
Returns the code to draw the cell border. | |
getBorderMode ($brd, $position='start') | |
Get the border mode accounting for multicell position (opens bottom side of multicell crossing pages) | |
getRemainingWidth () | |
Returns the remaining width between the current position and margins. | |
fitBlock (&$w, &$h, &$x, &$y, $fitonpage=false) | |
Set the block dimensions accounting for page breaks and page/column fitting. | |
_toJPEG ($image) | |
Convert the loaded image to a JPEG and then return a structure for the PDF creator. | |
_toPNG ($image) | |
Convert the loaded image to a PNG and then return a structure for the PDF creator. | |
_setGDImageTransparency ($new_image, $image) | |
Set the transparency for the given GD image. | |
_parsejpeg ($file) | |
Extract info from a JPEG file without using the GD library. | |
_parsepng ($file) | |
Extract info from a PNG file without using the GD library. | |
rfread ($handle, $length) | |
Binary-safe and URL-safe file read. | |
ImagePngAlpha ($file, $x, $y, $wpx, $hpx, $w, $h, $type, $link, $align, $resize, $dpi, $palign) | |
Extract info from a PNG image with alpha channel using the GD library. | |
getGDgamma ($v) | |
Correct the gamma value to be used with GD library. | |
_dochecks () | |
Check for locale-related bug protected. | |
_getfontpath () | |
Return fonts path. | |
_putpages () | |
Output pages. | |
_putannotsrefs ($n) | |
Output references to page annotations. | |
_getannotsrefs ($n) | |
Get references to page annotations. | |
_putannotsobjs () | |
Output annotations objects for all pages. | |
_putAPXObject ($w=0, $h=0, $stream='') | |
Put appearance streams XObject used to define annotation's appearance states. | |
_getULONG (&$str, &$offset) | |
Get ULONG from string (Big Endian 32-bit unsigned integer). | |
_getUSHORT (&$str, &$offset) | |
Get USHORT from string (Big Endian 16-bit unsigned integer). | |
_getSHORT (&$str, &$offset) | |
Get SHORT from string (Big Endian 16-bit signed integer). | |
_getBYTE (&$str, &$offset) | |
Get BYTE from string (8-bit unsigned integer). | |
_getTrueTypeFontSubset ($font, $subsetchars) | |
Returns a subset of the TrueType font data without the unused glyphs. | |
_getTTFtableChecksum ($table, $length) | |
Returs the checksum of a TTF table. | |
_putfontwidths ($font, $cidoffset=0) | |
Outputs font widths. | |
_putfonts () | |
Output fonts. | |
_puttruetypeunicode ($font) | |
Adds unicode fonts. | |
_putcidfont0 ($font) | |
Output CID-0 fonts. | |
_putimages () | |
Output images. | |
_putxobjects () | |
Output Form XObjects Templates. | |
_putspotcolors () | |
Output Spot Colors Resources. | |
_getxobjectdict () | |
Return XObjects Dictionary. | |
_putresourcedict () | |
Output Resources Dictionary. | |
_putresources () | |
Output Resources. | |
_putinfo () | |
Adds some Metadata information (Document Information Dictionary) (see Chapter 14.3.3 Document Information Dictionary of PDF32000_2008.pdf Reference) | |
_putcatalog () | |
Output Catalog. | |
_putviewerpreferences () | |
Output viewer preferences. | |
_putheader () | |
Output PDF header. | |
_enddoc () | |
Output end of document (EOF). | |
_beginpage ($orientation='', $format='') | |
Initialize a new page. | |
_endpage () | |
Mark end of page. | |
_newobj () | |
Begin a new object and return the object number. | |
_getobj ($objid='') | |
Return the starting object string for the selected object ID. | |
_dounderline ($x, $y, $txt) | |
Underline text. | |
_dounderlinew ($x, $y, $w) | |
Underline for rectangular text area. | |
_dolinethrough ($x, $y, $txt) | |
Line through text. | |
_dolinethroughw ($x, $y, $w) | |
Line through for rectangular text area. | |
_dooverline ($x, $y, $txt) | |
Overline text. | |
_dooverlinew ($x, $y, $w) | |
Overline for rectangular text area. | |
_freadint ($f) | |
Read a 4-byte (32 bit) integer from file. | |
_escape ($s) | |
Add "\" before "\", "(" and ")". | |
_datastring ($s, $n=0) | |
Format a data string for meta information. | |
_datestring ($n=0) | |
Returns a formatted date for meta information. | |
_textstring ($s, $n=0) | |
Format a text string for meta information. | |
_escapetext ($s) | |
THIS METHOD IS DEPRECATED Format a text string. | |
_getrawstream ($s, $n=0) | |
get raw output stream. | |
_getstream ($s, $n=0) | |
Format output stream (DEPRECATED). | |
_putstream ($s, $n=0) | |
Output a stream (DEPRECATED). | |
_out ($s) | |
Output a string to the document. | |
UTF8StringToArray ($str) | |
Converts UTF-8 strings to codepoints array. | |
UTF8ToUTF16BE ($str, $setbom=true) | |
Converts UTF-8 strings to UTF16-BE. | |
UTF8ToLatin1 ($str) | |
Converts UTF-8 strings to Latin1 when using the standard 14 core fonts. | |
UTF8ArrToLatin1 ($unicode) | |
Converts UTF-8 characters array to array of Latin1 characters | |
arrUTF8ToUTF16BE ($unicode, $setbom=true) | |
Converts array of UTF-8 characters to UTF16-BE string. | |
getRandomSeed ($seed='') | |
Returns a string containing random data to be used as a seed for encryption methods. | |
_objectkey ($n) | |
Compute encryption key depending on object number where the encrypted data is stored. | |
_encrypt_data ($n, $s) | |
Encrypt the input string. | |
_putencryption () | |
Put encryption on PDF document. | |
_RC4 ($key, $text) | |
Returns the input text encrypted using RC4 algorithm and the specified key. | |
_AES ($key, $text) | |
Returns the input text exrypted using AES algorithm and the specified key. | |
_md5_16 ($str) | |
Encrypts a string using MD5 and returns it's value as a binary string. | |
_Uvalue () | |
Compute U value (used for encryption) | |
_UEvalue () | |
Compute UE value (used for encryption) | |
_Ovalue () | |
Compute O value (used for encryption) | |
_OEvalue () | |
Compute OE value (used for encryption) | |
_fixAES256Password ($password) | |
Convert password for AES-256 encryption mode. | |
_generateencryptionkey () | |
Compute encryption key protected. | |
getUserPermissionCode ($permissions, $mode=0) | |
Return the premission code used on encryption (P value). | |
convertHexStringToString ($bs) | |
Convert hexadecimal string to string. | |
convertStringToHexString ($s) | |
Convert string to hexadecimal string (byte string) | |
getEncPermissionsString ($protection) | |
Convert encryption P value to a string of bytes, low-order byte first. | |
Transform ($tm) | |
Apply graphic transformations. | |
_outPoint ($x, $y) | |
Begin a new subpath by moving the current point to coordinates (x, y), omitting any connecting line segment. | |
_outLine ($x, $y) | |
Append a straight line segment from the current point to the point (x, y). | |
_outRect ($x, $y, $w, $h, $op) | |
Append a rectangle to the current path as a complete subpath, with lower-left corner (x, y) and dimensions widthand height in user space. | |
_outCurve ($x1, $y1, $x2, $y2, $x3, $y3) | |
Append a cubic Bézier curve to the current path. | |
_outCurveV ($x2, $y2, $x3, $y3) | |
Append a cubic Bézier curve to the current path. | |
_outCurveY ($x1, $y1, $x3, $y3) | |
Append a cubic Bézier curve to the current path. | |
_outellipticalarc ($xc, $yc, $rx, $ry, $xang=0, $angs=0, $angf=360, $pie=false, $nc=2) | |
Append an elliptical arc to the current path. | |
utf8StrRev ($str, $setbom=false, $forcertl=false) | |
Reverse the RLT substrings using the Bidirectional Algorithm (http://unicode.org/reports/tr9/). | |
utf8StrArrRev ($arr, $str='', $setbom=false, $forcertl=false) | |
Reverse the RLT substrings array using the Bidirectional Algorithm (http://unicode.org/reports/tr9/). | |
utf8Bidi ($ta, $str='', $forcertl=false) | |
Reverse the RLT substrings using the Bidirectional Algorithm (http://unicode.org/reports/tr9/). | |
_putbookmarks () | |
Create a bookmark PDF string. | |
_putjavascript () | |
Create a javascript PDF string. | |
_JScolor ($color) | |
Convert color to javascript color. | |
_addfield ($type, $name, $x, $y, $w, $h, $prop) | |
Adds a javascript form field. | |
getAnnotOptFromJSProp ($prop) | |
Convert JavaScript form fields properties array to Annotation Properties array. | |
_putsignature () | |
Add certification signature (DocMDP or UR3) You can set only one signature type protected. | |
formatPageNumber ($num) | |
Format the page numbers. | |
formatTOCPageNumber ($num) | |
Format the page numbers on the Table Of Content. | |
_putocg () | |
Put visibility settings. | |
addExtGState ($parms) | |
Add transparency parameters to the current extgstate. | |
setExtGState ($gs) | |
Add an extgstate. | |
_putextgstates () | |
Put extgstates for object transparency. | |
Clip ($x, $y, $w, $h) | |
Set a rectangular clipping area. | |
extractCSSproperties ($cssdata) | |
Extracts the CSS properties from a CSS string. | |
isValidCSSSelectorForTag ($dom, $key, $selector) | |
Returns true if the CSS selector is valid for the selected HTML tag. | |
getTagStyleFromCSS ($dom, $key, $css) | |
Returns the styles that apply for the selected HTML tag. | |
getCSSBorderWidth ($width) | |
Returns the border width from CSS property. | |
getCSSBorderDashStyle ($style) | |
Returns the border dash style from CSS property. | |
getCSSBorderStyle ($cssborder) | |
Returns the border style array from CSS border properties. | |
getCSSFontSpacing ($spacing, $parent=0) | |
Returns the letter-spacing value from CSS value. | |
getCSSFontStretching ($stretch, $parent=100) | |
Returns the percentage of font stretching from CSS value. | |
getHtmlDomArray ($html) | |
Returns the HTML DOM array. | |
getSpaceString () | |
Returns the string used to find spaces. | |
openHTMLTagHandler (&$dom, $key, $cell) | |
Process opening tags. | |
closeHTMLTagHandler (&$dom, $key, $cell, $maxbottomliney=0) | |
Process closing tags. | |
addHTMLVertSpace ($hbz=0, $hb=0, $cell=false, $firsttag=false, $lasttag=false) | |
Add vertical spaces if needed. | |
getBorderStartPosition () | |
Return the starting coordinates to draw an html border. | |
drawHTMLTagBorder ($tag, $xmax) | |
Draw an HTML block border and fill. | |
swapMargins ($reverse=true) | |
Swap the left and right margins. | |
putHtmlListBullet ($listdepth, $listtype='', $size=10) | |
Output an HTML list bullet or ordered item symbol. | |
getGraphicVars () | |
Returns current graphic variables as array. | |
setGraphicVars ($gvars, $extended=false) | |
Set graphic variables. | |
getObjFilename ($name) | |
Returns a temporary filename for caching object on filesystem. | |
writeDiskCache ($filename, $data, $append=false) | |
Writes data to a temporary file on filesystem. | |
readDiskCache ($filename) | |
Read data from a temporary file on filesystem. | |
setBuffer ($data) | |
Set buffer content (always append data). | |
replaceBuffer ($data) | |
Replace the buffer content. | |
getBuffer () | |
Get buffer content. | |
setPageBuffer ($page, $data, $append=false) | |
Set page buffer content. | |
getPageBuffer ($page) | |
Get page buffer content. | |
setImageBuffer ($image, $data) | |
Set image buffer content. | |
setImageSubBuffer ($image, $key, $data) | |
Set image buffer content for a specified sub-key. | |
getImageBuffer ($image) | |
Get image buffer content. | |
setFontBuffer ($font, $data) | |
Set font buffer content. | |
setFontSubBuffer ($font, $key, $data) | |
Set font buffer content. | |
getFontBuffer ($font) | |
Get font buffer content. | |
hyphenateWord ($word, $patterns, $dictionary=array(), $leftmin=1, $rightmin=2, $charmin=1, $charmax=8) | |
Returns an array of chars containing soft hyphens. | |
getPathPaintOperator ($style, $default='S') | |
Get the Path-Painting Operators. | |
checkPageRegions ($h=0, &$x='', &$y='') | |
Check page for no-write regions and adapt current coordinates and page margins if necessary. | |
getSVGTransformMatrix ($attribute) | |
Get the tranformation matrix from SVG transform attribute. | |
getTransformationMatrixProduct ($ta, $tb) | |
Get the product of two SVG tranformation matrices. | |
convertSVGtMatrix ($tm) | |
Convert SVG transformation matrix to PDF. | |
SVGTransform ($tm) | |
Apply SVG graphic transformation matrix. | |
setSVGStyles ($svgstyle, $prevsvgstyle, $x=0, $y=0, $w=1, $h=1, $clip_function='', $clip_params=array()) | |
Apply the requested SVG styles (*** TO BE COMPLETED ***) | |
SVGPath ($d, $style='') | |
Draws an SVG path. | |
getVectorsAngle ($x1, $y1, $x2, $y2) | |
Returns the angle in radiants between two vectors. | |
startSVGElementHandler ($parser, $name, $attribs, $ctm=array()) | |
Sets the opening SVG element handler function for the XML parser. | |
endSVGElementHandler ($parser, $name) | |
Sets the closing SVG element handler function for the XML parser. | |
segSVGContentHandler ($parser, $data) | |
Sets the character data handler function for the XML parser. |
Protected Attributes | |
$page | |
$n | |
$offsets | |
$buffer | |
$pages = array() | |
$state | |
$compress | |
$CurOrientation | |
$pagedim = array() | |
$k | |
$fwPt | |
$fhPt | |
$wPt | |
$hPt | |
$w | |
$h | |
$lMargin | |
$tMargin | |
$rMargin | |
$bMargin | |
$cell_padding = array('T' => 0, 'R' => 0, 'B' => 0, 'L' => 0) | |
$cell_margin = array('T' => 0, 'R' => 0, 'B' => 0, 'L' => 0) | |
$x | |
$y | |
$lasth | |
$LineWidth | |
$CoreFonts | |
$fonts = array() | |
$FontFiles = array() | |
$diffs = array() | |
$images = array() | |
$PageAnnots = array() | |
$links = array() | |
$FontFamily | |
$FontStyle | |
$FontAscent | |
$FontDescent | |
$underline | |
$overline | |
$CurrentFont | |
$FontSizePt | |
$FontSize | |
$DrawColor | |
$FillColor | |
$TextColor | |
$ColorFlag | |
$AutoPageBreak | |
$PageBreakTrigger | |
$InFooter = false | |
$ZoomMode | |
$LayoutMode | |
$title = '' | |
$subject = '' | |
$author = '' | |
$keywords = '' | |
$creator = '' | |
$AliasNbPages = '{nb}' | |
$AliasNumPage = '{pnb}' | |
$img_rb_x | |
$img_rb_y | |
$imgscale = 1 | |
$isunicode = false | |
$unicode | |
$PDFVersion = '1.7' | |
$header_margin | |
$footer_margin | |
$original_lMargin | |
$original_rMargin | |
$header_font | |
$footer_font | |
$l | |
$barcode = false | |
$print_header = true | |
$print_footer = true | |
$header_logo = '' | |
$header_logo_width = 30 | |
$header_title = '' | |
$header_string = '' | |
$default_table_columns = 4 | |
$HREF = array() | |
$fontlist = array() | |
$fgcolor | |
$listordered = array() | |
$listcount = array() | |
$listnum = 0 | |
$listindent = 0 | |
$listindentlevel = 0 | |
$bgcolor | |
$tempfontsize = 10 | |
$lispacer = '' | |
$encoding = 'UTF-8' | |
$internal_encoding | |
$rtl = false | |
$tmprtl = false | |
$encrypted | |
Indicates whether document is protected protected. | |
$encryptdata = array() | |
Array containing encryption settings protected. | |
$last_enc_key | |
last RC4 key encrypted (cached for optimisation) protected | |
$last_enc_key_c | |
last RC4 computed key protected | |
$enc_padding = "\x28\xBF\x4E\x5E\x4E\x75\x8A\x41\x64\x00\x4E\x56\xFF\xFA\x01\x08\x2E\x2E\x00\xB6\xD0\x68\x3E\x80\x2F\x0C\xA9\xFE\x64\x53\x69\x7A" | |
Encryption padding protected. | |
$file_id | |
File ID (used on trailer) protected. | |
$outlines = array() | |
Outlines for bookmark protected. | |
$OutlineRoot | |
Outline root for bookmark protected. | |
$javascript = '' | |
javascript code protected | |
$n_js | |
javascript counter protected | |
$linethrough | |
line trough state protected | |
$ur = array() | |
Array with additional document-wide usage rights for the document. | |
$dpi = 72 | |
Dot Per Inch Document Resolution (do not change) protected. | |
$newpagegroup = array() | |
Array of page numbers were a new page group was started protected. | |
$pagegroups | |
Contains the number of pages of the groups protected. | |
$currpagegroup | |
Contains the alias of the current page group protected. | |
$visibility = 'all' | |
Restrict the rendering of some elements to screen or printout. | |
$n_ocg_print | |
Print visibility. | |
$n_ocg_view | |
View visibility. | |
$extgstates | |
Array of transparency objects and parameters. | |
$jpeg_quality | |
Set the default JPEG compression quality (1-100) protected. | |
$cell_height_ratio = K_CELL_HEIGHT_RATIO | |
Default cell height ratio. | |
$viewer_preferences | |
PDF viewer preferences. | |
$PageMode | |
A name object specifying how the document should be displayed when opened. | |
$gradients = array() | |
Array for storing gradient information. | |
$intmrk = array() | |
Array used to store positions inside the pages buffer. | |
$bordermrk = array() | |
Array used to store positions inside the pages buffer. | |
$emptypagemrk = array() | |
Array used to store page positions to track empty pages. | |
$cntmrk = array() | |
Array used to store content positions inside the pages buffer. | |
$footerpos = array() | |
Array used to store footer positions of each page. | |
$footerlen = array() | |
Array used to store footer length of each page. | |
$newline = true | |
True if a newline is created. | |
$endlinex = 0 | |
End position of the latest inserted line protected. | |
$linestyleWidth = '' | |
PDF string for last line width protected. | |
$linestyleCap = '0 J' | |
PDF string for last line width protected. | |
$linestyleJoin = '0 j' | |
PDF string for last line width protected. | |
$linestyleDash = '[] 0 d' | |
PDF string for last line width protected. | |
$openMarkedContent = false | |
True if marked-content sequence is open protected. | |
$htmlvspace = 0 | |
Count the latest inserted vertical spaces on HTML protected. | |
$spot_colors = array() | |
Array of Spot colors protected. | |
$lisymbol = '' | |
Symbol used for HTML unordered list items protected. | |
$epsmarker = 'x#!#EPS#!#x' | |
String used to mark the beginning and end of EPS image blocks protected. | |
$transfmatrix = array() | |
Array of transformation matrix protected. | |
$transfmatrix_key = 0 | |
Current key for transformation matrix protected. | |
$booklet = false | |
Booklet mode for double-sided pages protected. | |
$feps = 0.005 | |
Epsilon value used for float calculations protected. | |
$tagvspaces = array() | |
Array used for custom vertical spaces for HTML tags protected. | |
$customlistindent = -1 | |
$opencell = true | |
$embeddedfiles = array() | |
$premode = false | |
$transfmrk = array() | |
Array used to store positions of graphics transformation blocks inside the page buffer. | |
$htmlLinkColorArray = array(0, 0, 255) | |
Default color for html links protected. | |
$htmlLinkFontStyle = 'U' | |
Default font style to add to html links protected. | |
$numpages = 0 | |
Counts the number of pages. | |
$pagelen = array() | |
Array containing page lengths in bytes. | |
$numimages = 0 | |
Counts the number of pages. | |
$imagekeys = array() | |
Store the image keys. | |
$bufferlen = 0 | |
Length of the buffer in bytes. | |
$diskcache = false | |
If true enables disk caching. | |
$numfonts = 0 | |
Counts the number of fonts. | |
$fontkeys = array() | |
Store the font keys. | |
$font_obj_ids = array() | |
Store the font object IDs. | |
$pageopen = array() | |
Store the fage status (true when opened, false when closed). | |
$default_monospaced_font = 'courier' | |
Default monospaced font protected. | |
$objcopy | |
Used to store a cloned copy of the current class object protected. | |
$cache_file_length = array() | |
Array used to store the lengths of cache files protected. | |
$thead = '' | |
Table header content to be repeated on each new page protected. | |
$theadMargins = array() | |
Margins used for table header. | |
$cache_UTF8StringToArray = array() | |
Cache array for UTF8StringToArray() method. | |
$cache_maxsize_UTF8StringToArray = 8 | |
Maximum size of cache array used for UTF8StringToArray() method. | |
$cache_size_UTF8StringToArray = 0 | |
Current size of cache array used for UTF8StringToArray() method. | |
$sign = false | |
If true enables document signing protected. | |
$signature_data = array() | |
Signature data protected. | |
$signature_max_length = 11742 | |
Signature max length protected. | |
$signature_appearance = array('page' => 1, 'rect' => '0 0 0 0') | |
data for signature appearance protected | |
$re_spaces = '/[^\S\xa0]/' | |
Regular expression used to find blank characters used for word-wrapping. | |
$re_space = array('p' => '[^\S\xa0]', 'm' => '') | |
Array of parts $re_spaces protected. | |
$sig_obj_id = 0 | |
Signature object ID protected. | |
$byterange_string = '/ByteRange[0 ********** ********** **********]' | |
ByteRange placemark used during signature process. | |
$sig_annot_ref = '***SIGANNREF*** 0 R' | |
Placemark used during signature process. | |
$page_obj_id = array() | |
ID of page objects protected. | |
$form_obj_id = array() | |
List of form annotations IDs protected. | |
$default_form_prop = array('lineWidth'=>1, 'borderStyle'=>'solid', 'fillColor'=>array(255, 255, 255), 'strokeColor'=>array(128, 128, 128)) | |
Deafult Javascript field properties. | |
$js_objects = array() | |
Javascript objects array protected. | |
$form_action = '' | |
Current form action (used during XHTML rendering) protected. | |
$form_enctype = 'application/x-www-form-urlencoded' | |
Current form encryption type (used during XHTML rendering) protected. | |
$form_mode = 'post' | |
Current method to submit forms. | |
$annotation_fonts = array() | |
List of fonts used on form fields (fontname => fontkey). | |
$radiobutton_groups = array() | |
List of radio buttons parent objects. | |
$radio_groups = array() | |
List of radio group objects IDs protected. | |
$textindent = 0 | |
Text indentation value (used for text-indent CSS attribute) protected. | |
$start_transaction_page = 0 | |
Store page number when startTransaction() is called. | |
$start_transaction_y = 0 | |
Store Y position when startTransaction() is called. | |
$inthead = false | |
True when we are printing the thead section on a new page protected. | |
$columns = array() | |
Array of column measures (width, space, starting Y position) protected. | |
$num_columns = 1 | |
Number of colums protected. | |
$current_column = 0 | |
Current column number protected. | |
$column_start_page = 0 | |
Starting page for columns protected. | |
$maxselcol = array('page' => 0, 'column' => 0) | |
Maximum page and column selected protected. | |
$colxshift = array('x' => 0, 's' => 0, 'p' => 0) | |
Array of: X difference between table cell x start and starting page margin, cellspacing, cellpadding protected. | |
$textrendermode = 0 | |
Text rendering mode: 0 = Fill text; 1 = Stroke text; 2 = Fill, then stroke text; 3 = Neither fill nor stroke text (invisible); 4 = Fill text and add to path for clipping; 5 = Stroke text and add to path for clipping; 6 = Fill, then stroke text and add to path for clipping; 7 = Add text to path for clipping. | |
$textstrokewidth = 0 | |
Text stroke width in doc units protected. | |
$strokecolor | |
$pdfunit = 'mm' | |
$tocpage = false | |
$rasterize_vector_images = false | |
$font_subsetting = true | |
$default_graphic_vars = array() | |
$xobjects = array() | |
$inxobj = false | |
$xobjid = '' | |
$font_stretching = 100 | |
$font_spacing = 0 | |
$page_regions = array() | |
$webcolor = array() | |
$svgdir = '' | |
$svgunit = 'px' | |
$svggradients = array() | |
$svggradientid = 0 | |
$svgdefsmode = false | |
$svgdefs = array() | |
$svgclipmode = false | |
$svgclippaths = array() | |
$svgcliptm = array() | |
$svgclipid = 0 | |
$svgtext = '' | |
$svgtextmode = array() | |
$svginheritprop = array('clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cursor', 'direction', 'fill', 'fill-opacity', 'fill-rule', 'font', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'image-rendering', 'kerning', 'letter-spacing', 'marker', 'marker-end', 'marker-mid', 'marker-start', 'pointer-events', 'shape-rendering', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-rendering', 'visibility', 'word-spacing', 'writing-mode') | |
$svgstyles |
TCPDF::__construct | ( | $orientation = 'P' , |
|
$unit = 'mm' , |
|||
$format = 'A4' , |
|||
$unicode = true , |
|||
$encoding = 'UTF-8' , |
|||
$diskcache = false |
|||
) |
This is the class constructor.
It allows to set up the page format, the orientation and the measure unit used in all the methods (except for the font sizes).
string | $orientation | page orientation. Possible values are (case insensitive):
|
string | $unit | User measure unit. Possible values are:
A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This is a very common unit in typography; font sizes are expressed in that unit. |
mixed | $format | 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 | $unicode | TRUE means that the input text is unicode (default = true) |
boolean | $diskcache | if TRUE reduce the RAM memory usage by caching temporary data on filesystem (slower). |
String | $encoding | charset encoding; default is UTF-8 public |
Definition at line 1753 of file tcpdf.php.
References $diskcache, $encoding, $k, $unicode, $webcolor, _dochecks(), getFontsList(), getGraphicVars(), getRandomSeed(), n, SetAutoPageBreak(), setCellMargins(), setCellPaddings(), SetCompression(), SetDisplayMode(), SetFont(), SetMargins(), setPageFormat(), setPageUnit(), setSpacesRE(), and utf8Bidi().
TCPDF::__destruct | ( | ) |
Default destructor.
public
Definition at line 1893 of file tcpdf.php.
References _destroy().
|
protected |
Adds a javascript form field.
string | $type | field type |
string | $name | field name |
int | $x | horizontal position |
int | $y | vertical position |
int | $w | width |
int | $h | height |
array | $prop | javascript field properties. Possible values are described on official Javascript for Acrobat API reference. protected |
Definition at line 14130 of file tcpdf.php.
References $name, $type, $x, and $y.
|
protected |
Returns the input text exrypted using AES algorithm and the specified key.
This method requires mcrypt.
string | $key | encryption key |
String | $text | input text to be encrypted |
Definition at line 11683 of file tcpdf.php.
|
protected |
Initialize a new page.
string | $orientation | page orientation. Possible values are (case insensitive):
|
mixed | $format | 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(). protected |
Definition at line 10627 of file tcpdf.php.
Referenced by startPage().
|
protected |
|
protected |
TCPDF::_destroy | ( | $destroyall = false , |
|
$preserve_objcopy = false |
|||
) |
Unset all class variables except the following critical variables: internal_encoding, state, bufferlen, buffer and diskcache.
boolean | $destroyall | if true destroys all class variables, otherwise preserves critical variables. |
boolean | $preserve_objcopy | if true preserves the objcopy variable public |
Definition at line 8020 of file tcpdf.php.
Referenced by __destruct(), Close(), and Error().
|
protected |
Check for locale-related bug protected.
Definition at line 8048 of file tcpdf.php.
Referenced by __construct().
|
protected |
|
protected |
Line through for rectangular text area.
int | $x | X coordinate |
int | $y | Y coordinate |
string | $txt | text to linethrough protected |
Definition at line 10747 of file tcpdf.php.
|
protected |
|
protected |
Overline for rectangular text area.
int | $x | X coordinate |
int | $y | Y coordinate |
int | $w | width to overline protected |
Definition at line 10773 of file tcpdf.php.
|
protected |
|
protected |
Underline for rectangular text area.
int | $x | X coordinate |
int | $y | Y coordinate |
int | $w | width to underline protected |
Definition at line 10722 of file tcpdf.php.
|
protected |
Encrypt the input string.
int | $n | object number |
string | $s | data string to encrypt |
Definition at line 11486 of file tcpdf.php.
|
protected |
Output end of document (EOF).
protected
Definition at line 10555 of file tcpdf.php.
Referenced by Close().
|
protected |
|
protected |
Add "\" before "\", "(" and ")".
string | $s | string to escape. |
Definition at line 10796 of file tcpdf.php.
Referenced by getCellCode().
|
protected |
THIS METHOD IS DEPRECATED Format a text string.
string | $s | string to escape. |
Definition at line 10851 of file tcpdf.php.
|
protected |
Convert password for AES-256 encryption mode.
Definition at line 11809 of file tcpdf.php.
|
protected |
Read a 4-byte (32 bit) integer from file.
string | $f | file name. |
Definition at line 10785 of file tcpdf.php.
References $f.
Referenced by _parsepng().
|
protected |
Compute encryption key protected.
Definition at line 11824 of file tcpdf.php.
References $f, and K_PATH_CACHE.
|
protected |
Get references to page annotations.
int | $n | page number |
Definition at line 8296 of file tcpdf.php.
|
protected |
Get BYTE from string (8-bit unsigned integer).
string | $str | string from where to extract value |
int | $offset | point from where to read the data |
Definition at line 9030 of file tcpdf.php.
|
protected |
Return fonts path.
Definition at line 8064 of file tcpdf.php.
References K_PATH_FONTS.
Referenced by AddFont(), and getFontsList().
|
protected |
Return the starting object string for the selected object ID.
int | $objid | Object ID (leave empty to get a new ID). |
Definition at line 10693 of file tcpdf.php.
Referenced by _putEmbeddedFiles().
|
protected |
get raw output stream.
string | $s | string to output. |
int | $n | object reference for encryption mode protected |
Definition at line 10871 of file tcpdf.php.
Referenced by _putEmbeddedFiles().
|
protected |
Get SHORT from string (Big Endian 16-bit signed integer).
string | $str | string from where to extract value |
int | $offset | point from where to read the data |
Definition at line 9015 of file tcpdf.php.
|
protected |
Format output stream (DEPRECATED).
string | $s | string to output. |
int | $n | object reference for encryption mode protected |
|
protected |
Returns a subset of the TrueType font data without the unused glyphs.
string | $font | TrueType font data |
array | $subsetchars | array of used characters (the glyphs to keep) |
Definition at line 9045 of file tcpdf.php.
References $data.
|
protected |
Returs the checksum of a TTF table.
string | $table | table to check |
int | $length | lenght of table in bytes |
Definition at line 9376 of file tcpdf.php.
|
protected |
Get ULONG from string (Big Endian 32-bit unsigned integer).
string | $str | string from where to extract value |
int | $offset | point from where to read the data |
Definition at line 8985 of file tcpdf.php.
|
protected |
Get USHORT from string (Big Endian 16-bit unsigned integer).
string | $str | string from where to extract value |
int | $offset | point from where to read the data |
Definition at line 9000 of file tcpdf.php.
|
protected |
|
protected |
Convert color to javascript color.
string | $color | color name or #RRGGBB protected |
Definition at line 14106 of file tcpdf.php.
|
protected |
|
protected |
|
protected |
Compute encryption key depending on object number where the encrypted data is stored.
This is used for all strings and streams without crypt filter specifier.
int | $n | object number |
Definition at line 11466 of file tcpdf.php.
|
protected |
Compute OE value (used for encryption)
Definition at line 11796 of file tcpdf.php.
|
protected |
Output a string to the document.
string | $s | string to output. protected |
Definition at line 10906 of file tcpdf.php.
Referenced by _putEmbeddedFiles(), Cell(), Close(), Image(), SetDrawColor(), SetDrawSpotColor(), SetFillColor(), SetFillSpotColor(), SetFontSize(), setFooter(), setHeader(), and SetTextSpotColor().
|
protected |
Append a cubic Bézier curve to the current path.
The curve shall extend from the current point to the point (x3, y3), using (x1, y1) and (x2, y2) as the Bézier control points. The new current point shall be (x3, y3).
float | $x1 | Abscissa of control point 1. |
float | $y1 | Ordinate of control point 1. |
float | $x2 | Abscissa of control point 2. |
float | $y2 | Ordinate of control point 2. |
float | $x3 | Abscissa of end point. |
float | $y3 | Ordinate of end point. protected |
Definition at line 12611 of file tcpdf.php.
|
protected |
Append a cubic Bézier curve to the current path.
The curve shall extend from the current point to the point (x3, y3), using the current point and (x2, y2) as the Bézier control points. The new current point shall be (x3, y3).
float | $x2 | Abscissa of control point 2. |
float | $y2 | Ordinate of control point 2. |
float | $x3 | Abscissa of end point. |
float | $y3 | Ordinate of end point. protected |
Definition at line 12625 of file tcpdf.php.
|
protected |
Append a cubic Bézier curve to the current path.
The curve shall extend from the current point to the point (x3, y3), using (x1, y1) and (x3, y3) as the Bézier control points. The new current point shall be (x3, y3).
float | $x1 | Abscissa of control point 1. |
float | $y1 | Ordinate of control point 1. |
float | $x2 | Abscissa of control point 2. |
float | $y2 | Ordinate of control point 2. |
float | $x3 | Abscissa of end point. |
float | $y3 | Ordinate of end point. protected |
Definition at line 12641 of file tcpdf.php.
|
protected |
Append an elliptical arc to the current path.
An ellipse is formed from n Bezier curves.
float | $xc | Abscissa of center point. |
float | $yc | Ordinate of center point. |
float | $rx | Horizontal radius. |
float | $ry | Vertical radius (if ry = 0 then is a circle, see Circle). Default value: 0. |
float | $xang,: | Angle between the X-axis and the major axis of the ellipse. Default value: 0. |
float | $angs,: | Angle start of draw line. Default value: 0. |
float | $angf,: | Angle finish of draw line. Default value: 360. |
boolean | $pie | if true do not mark the border point (used to draw pie sectors). |
integer | $nc | Number of curves used to draw a 90 degrees portion of ellipse. |
Definition at line 12837 of file tcpdf.php.
|
protected |
|
protected |
|
protected |
Append a rectangle to the current path as a complete subpath, with lower-left corner (x, y) and dimensions widthand height in user space.
float | $x | Abscissa of upper-left corner (or upper-right corner for RTL language). |
float | $y | Ordinate of upper-left corner (or upper-right corner for RTL language). |
float | $w | Width. |
float | $h | Height. |
string | $op | options protected |
|
protected |
Compute O value (used for encryption)
Definition at line 11758 of file tcpdf.php.
References $enc.
|
protected |
Extract info from a JPEG file without using the GD library.
string | $file | image file to parse |
Definition at line 7435 of file tcpdf.php.
References $data, $file, and Error().
Referenced by _toJPEG(), and Image().
|
protected |
Extract info from a PNG file without using the GD library.
string | $file | image file to parse |
Definition at line 7461 of file tcpdf.php.
References $data, $f, $file, $h, $n, $pos, $t, $type, $w, _freadint(), Error(), and rfread().
Referenced by _toPNG().
|
protected |
Output annotations objects for all pages.
!!! THIS METHOD IS NOT YET COMPLETED !!! See section 12.5 of PDF 32000_2008 reference. protected
Definition at line 8332 of file tcpdf.php.
References $d, $data, $f, $filename, $l, and $t.
|
protected |
Output references to page annotations.
int | $n | page number protected |
|
protected |
Put appearance streams XObject used to define annotation's appearance states.
int | $w | annotation width |
int | $h | annotation height |
string | $stream | appearance stream |
Definition at line 8944 of file tcpdf.php.
|
protected |
Create a bookmark PDF string.
protected
Definition at line 13943 of file tcpdf.php.
References $out, $row, $title, and n.
|
protected |
Output Catalog.
Definition at line 10380 of file tcpdf.php.
References $out.
|
protected |
Output CID-0 fonts.
A Type 0 CIDFont contains glyph descriptions based on the Adobe Type 1 font format
array | $font | font data protected |
Definition at line 10040 of file tcpdf.php.
References $cidinfo, $cw, $enc, $name, and $out.
|
protected |
Embedd the attached files.
Definition at line 5119 of file tcpdf.php.
References $data, $filename, $out, _getobj(), _getrawstream(), and _out().
|
protected |
Put encryption on PDF document.
protected
Definition at line 11514 of file tcpdf.php.
References $out.
|
protected |
Put extgstates for object transparency.
array | $gs | extgstate protected |
Definition at line 15485 of file tcpdf.php.
References $out.
|
protected |
Output fonts.
Definition at line 9497 of file tcpdf.php.
References $cw, $diff, $file, $name, $out, and $type.
|
protected |
Outputs font widths.
array | $font | font data |
int | $cidoffset | offset for CID values |
Definition at line 9398 of file tcpdf.php.
|
protected |
|
protected |
Output images.
protected
Definition at line 10110 of file tcpdf.php.
References $file, $out, and n.
|
protected |
Adds some Metadata information (Document Information Dictionary) (see Chapter 14.3.3 Document Information Dictionary of PDF32000_2008.pdf Reference)
Definition at line 10333 of file tcpdf.php.
References $out, and PDF_PRODUCER.
|
protected |
Create a javascript PDF string.
protected
Definition at line 14052 of file tcpdf.php.
References $out.
|
protected |
Put visibility settings.
protected
Definition at line 15405 of file tcpdf.php.
|
protected |
Output pages.
protected
Definition at line 8075 of file tcpdf.php.
References $out.
|
protected |
Output Resources Dictionary.
protected
Definition at line 10253 of file tcpdf.php.
References $out.
|
protected |
Output Resources.
protected
Definition at line 10311 of file tcpdf.php.
TCPDF::_putshaders | ( | ) |
Output gradient shaders.
Definition at line 16039 of file tcpdf.php.
|
protected |
Add certification signature (DocMDP or UR3) You can set only one signature type protected.
Definition at line 15078 of file tcpdf.php.
References $out.
|
protected |
Output Spot Colors Resources.
protected
Definition at line 10221 of file tcpdf.php.
|
protected |
Output a stream (DEPRECATED).
string | $s | string to output. |
int | $n | object reference for encryption mode protected |
|
protected |
Adds unicode fonts.
Based on PDF Reference 1.3 (section 5)
array | $font | font data protected |
Definition at line 9653 of file tcpdf.php.
References $cidinfo, $out, and n.
|
protected |
Output viewer preferences.
Definition at line 10476 of file tcpdf.php.
References $out.
|
protected |
Output Form XObjects Templates.
Definition at line 10169 of file tcpdf.php.
|
protected |
Returns the input text encrypted using RC4 algorithm and the specified key.
RC4 is the standard encryption algorithm used in PDF format
string | $key | encryption key |
String | $text | input text to be encrypted |
Definition at line 11637 of file tcpdf.php.
|
protected |
Set the transparency for the given GD image.
image | $new_image | GD image object |
image | $image | GD image object. return GD image object. protected |
Definition at line 7414 of file tcpdf.php.
Referenced by Image().
|
protected |
Format a text string for meta information.
string | $s | string to escape. |
int | $n | object ID |
|
protected |
Convert the loaded image to a JPEG and then return a structure for the PDF creator.
This function requires GD library and write access to the directory defined on K_PATH_CACHE constant.
string | $file | Image file name. |
image | $image | Image object. return image JPEG image object. protected |
Definition at line 7377 of file tcpdf.php.
References _parsejpeg(), and K_PATH_CACHE.
Referenced by Image().
|
protected |
Convert the loaded image to a PNG and then return a structure for the PDF creator.
This function requires GD library and write access to the directory defined on K_PATH_CACHE constant.
string | $file | Image file name. |
image | $image | Image object. return image PNG image object. protected |
Definition at line 7396 of file tcpdf.php.
References _parsepng(), and K_PATH_CACHE.
Referenced by Image().
|
protected |
Compute UE value (used for encryption)
Definition at line 11745 of file tcpdf.php.
|
protected |
Compute U value (used for encryption)
Definition at line 11712 of file tcpdf.php.
References $enc.
TCPDF::AcceptPageBreak | ( | ) |
Whenever a page break condition is met, the method is called, and the break is issued or not depending on the returned value.
The default implementation returns a value according to the mode selected by SetAutoPageBreak().
This method is called automatically and should not be called directly by the application.
Definition at line 5181 of file tcpdf.php.
References $AutoPageBreak, AddPage(), and selectColumn().
Referenced by checkPageBreak(), and Write().
|
protected |
Add transparency parameters to the current extgstate.
array | $params | parameters |
TCPDF::AddFont | ( | $family, | |
$style = '' , |
|||
$fontfile = '' , |
|||
$subset = 'default' |
|||
) |
Imports a TrueType, Type1, core, or CID0 font and makes it available.
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.
string | $family | Font family. The name can be chosen arbitrarily. If it is a standard family name, it will override the corresponding font. |
string | $style | Font style. Possible values are (case insensitive):
|
string | $fontfile | The font definition file. By default, the name is built from the family and style, in lower case with no spaces. |
mixed | $subset | 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. public |
Definition at line 4622 of file tcpdf.php.
References $cidinfo, $ctg, $cw, $d, $desc, $diff, $dw, $enc, $file, $font_subsetting, $FontFamily, $name, $numfonts, $originalsize, $type, $up, $ut, $xobjid, _getfontpath(), empty_string(), Error(), getFontBuffer(), setFontBuffer(), and setFontSubBuffer().
Referenced by getFontAscent(), getFontDescent(), and SetFont().
TCPDF::addHtmlLink | ( | $url, | |
$name, | |||
$fill = false , |
|||
$firstline = false , |
|||
$color = '' , |
|||
$style = -1 , |
|||
$firstblock = false |
|||
) |
Output anchor link.
string | $url | link URL or internal link (i.e.: <a href="#23,4.5">link to page 23 at 4.5 Y position</a>) |
string | $name | link name |
boolean | $fill | Indicates if the cell background must be painted (true) or transparent (false). |
boolean | $firstline | if true prints only the first line and return the remaining string. |
array | $color | array of RGB text color |
string | $style | font style (U, D, B, I) |
boolean | $firstblock | if true the string is the starting of a line. |
Definition at line 11288 of file tcpdf.php.
TCPDF::addHTMLTOC | ( | $page = '' , |
|
$toc_name = 'TOC' , |
|||
$templates = array() , |
|||
$correct_align = true |
|||
) |
Output a Table Of Content Index (TOC) using HTML templates.
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.
int | $page | page number where this TOC should be inserted (leave empty for current page). |
string | $toc_name | name to use for TOC bookmark. |
array | $templates | array of html templates. Use: #TOC_DESCRIPTION# for bookmark title, #TOC_PAGE_NUMBER# for page number. |
boolean | $correct_align | if true correct the number alignment (numbers must be in monospaced font like courier and right aligned on LTR, or left aligned on RTL) public |
Definition at line 22820 of file tcpdf.php.
References $row.
|
protected |
Add vertical spaces if needed.
string | $hbz | Distance between current y and line bottom. |
string | $hb | The height of the break. |
boolean | $cell | if true add the default left (or right if RTL) padding to each new line (default false). |
boolean | $firsttag | set to true when the tag is the first. |
boolean | $lasttag | set to true when the tag is the last. protected |
Definition at line 21252 of file tcpdf.php.
TCPDF::addJavascriptObject | ( | $script, | |
$onload = false |
|||
) |
TCPDF::AddLink | ( | ) |
Creates a new internal link and returns its identifier.
An internal link is a clickable area which directs to another place within the document.
The identifier can then be passed to Cell(), Write(), Image() or Link(). The destination is defined with SetLink(). public
Definition at line 4975 of file tcpdf.php.
References $n.
TCPDF::AddPage | ( | $orientation = '' , |
|
$format = '' , |
|||
$keepmargins = false , |
|||
$tocpage = false |
|||
) |
Adds a new page to the document.
If a page is already present, the Footer() method is called first to output the footer (if enabled). Then the page is added, the current position set to the top-left corner according to the left and top margins (or top-right if in RTL mode), and Header() is called to display the header (if enabled). The origin of the coordinate system is at the top-left corner (or top-right for RTL) and increasing ordinates go downwards.
string | $orientation | page orientation. Possible values are (case insensitive):
|
mixed | $format | 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 | $keepmargins | if true overwrites the default page margins with the current margins |
boolean | $tocpage | if true set the tocpage state to true (the added page will be used to display Table Of Content). public |
Definition at line 3737 of file tcpdf.php.
References $lMargin, $rMargin, $tocpage, endPage(), and startPage().
Referenced by AcceptPageBreak(), addTOCPage(), checkPageBreak(), and Close().
TCPDF::addPageRegion | ( | $region | ) |
Add a single no-write region on selected page.
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.
array | $region | 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). |
Definition at line 23913 of file tcpdf.php.
TCPDF::AddSpotColor | ( | $name, | |
$c, | |||
$m, | |||
$y, | |||
$k | |||
) |
Defines a new spot color.
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.
int | $c | Cyan color for CMYK. Value between 0 and 255 |
int | $m | Magenta color for CMYK. Value between 0 and 255 |
int | $y | Yellow color for CMYK. Value between 0 and 255 |
int | $k | Key (Black) color for CMYK. Value between 0 and 255 public |
TCPDF::addTOC | ( | $page = '' , |
|
$numbersfont = '' , |
|||
$filler = '.' , |
|||
$toc_name = 'TOC' |
|||
) |
Output a Table of Content Index (TOC).
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.
int | $page | page number where this TOC should be inserted (leave empty for current page). |
string | $numbersfont | set the font for page numbers (please use monospaced font for better alignment). |
string | $filler | string used to fill the space between text and page number. |
string | $toc_name | name to use for TOC bookmark. public |
Definition at line 22648 of file tcpdf.php.
References $x.
TCPDF::addTOCPage | ( | $orientation = '' , |
|
$format = '' , |
|||
$keepmargins = false |
|||
) |
Adds a new TOC (Table Of Content) page to the document.
string | $orientation | page orientation. |
boolean | $keepmargins | if true overwrites the default page margins with the current margins public |
Definition at line 3712 of file tcpdf.php.
References AddPage().
|
protected |
Adjust the internal Cell padding array to take account of the line width.
mixed | $brd | Indicates if borders must be drawn around the cell. The value can be a number:
|
Definition at line 3318 of file tcpdf.php.
References $cell_padding, and $LineWidth.
Referenced by Cell(), getCellCode(), getNumLines(), getStringHeight(), and MultiCell().
TCPDF::AliasNbPages | ( | ) |
Defines an alias for the total number of pages.
It will be substituted as the document is closed.
string | $alias | The alias. public |
Definition at line 15270 of file tcpdf.php.
TCPDF::AliasNumPage | ( | ) |
Defines an alias for the page number.
It will be substituted as the document is closed.
string | $alias | The alias. public |
Definition at line 15297 of file tcpdf.php.
TCPDF::Annotation | ( | $x, | |
$y, | |||
$w, | |||
$h, | |||
$text, | |||
$opt = array('Subtype'=>'Text') , |
|||
$spaces = 0 |
|||
) |
Puts a markup annotation on a rectangular area of the page.
!!!!THE ANNOTATION SUPPORT IS NOT YET FULLY IMPLEMENTED !!!!
float | $x | Abscissa of the upper-left corner of the rectangle |
float | $y | Ordinate of the upper-left corner of the rectangle |
float | $w | Width of the rectangle |
float | $h | Height of the rectangle |
string | $text | annotation text or alternate content |
array | $opt | array of options (see section 8.4 of PDF reference 1.7). |
int | $spaces | number of spaces on the text to link public |
Definition at line 5031 of file tcpdf.php.
References $h, $k, $n, $page, $w, $x, $xobjid, $y, checkPageRegions(), empty_string(), Image(), and n.
Referenced by Link().
TCPDF::Arrow | ( | $x0, | |
$y0, | |||
$x1, | |||
$y1, | |||
$head_style = 0 , |
|||
$arm_size = 5 , |
|||
$arm_angle = 15 |
|||
) |
Draws a grahic arrow.
float | $x0 | Abscissa of first point. |
float | $y0 | Ordinate of first point. |
float | $x0 | Abscissa of second point. |
float | $y1 | Ordinate of second point. |
int | $head_style | (0 = draw only arrowhead arms, 1 = draw closed arrowhead, but no fill, 2 = closed and filled arrowhead, 3 = filled arrowhead) |
float | $arm_size | length of arrowhead arms |
int | $arm_angle | angle between an arm and the shaft |
Definition at line 13245 of file tcpdf.php.
|
protected |
Converts array of UTF-8 characters to UTF16-BE string.
Based on: http://www.faqs.org/rfcs/rfc2781.html
Encoding UTF-16:
Encoding of a single character from an ISO 10646 character value to UTF-16 proceeds as follows. Let U be the character number, no greater than 0x10FFFF.
1) If U < 0x10000, encode U as a 16-bit unsigned integer and terminate.
2) Let U' = U - 0x10000. Because U is less than or equal to 0x10FFFF, U' must be less than or equal to 0xFFFFF. That is, U' can be represented in 20 bits.
3) Initialize two 16-bit unsigned integers, W1 and W2, to 0xD800 and 0xDC00, respectively. These integers each have 10 bits free to encode the character value, for a total of 20 bits.
4) Assign the 10 high-order bits of the 20-bit U' to the 10 low-order bits of W1 and the 10 low-order bits of U' to the 10 low-order bits of W2. Terminate.
Graphically, steps 2 through 4 look like: U' = yyyyyyyyyyxxxxxxxxxx W1 = 110110yyyyyyyyyy W2 = 110111xxxxxxxxxx
array | $unicode | array containing UTF-8 unicode values |
boolean | $setbom | if true set the Byte Order Mark (BOM = 0xFEFF) |
Definition at line 11183 of file tcpdf.php.
Referenced by getCellCode().
TCPDF::Bookmark | ( | $txt, | |
$level = 0 , |
|||
$y = -1 , |
|||
$page = '' |
|||
) |
Adds a bookmark.
string | $txt | bookmark description. |
int | $level | bookmark level (minimum value is 0). |
float | $y | Y position in user units of the bookmark on the selected page (default = -1 = current position; 0 = page start;). |
int | $page | target page number (leave empty for current page). public |
Definition at line 13912 of file tcpdf.php.
References $y.
TCPDF::Button | ( | $name, | |
$w, | |||
$h, | |||
$caption, | |||
$action, | |||
$prop = array() , |
|||
$opt = array() , |
|||
$x = '' , |
|||
$y = '' , |
|||
$js = false |
|||
) |
Creates a button field.
string | $name | field name |
int | $w | width |
int | $h | height |
string | $caption | caption. |
mixed | $action | 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 | $prop | javascript field properties. Possible values are described on official Javascript for Acrobat API reference. |
array | $opt | annotation parameters. Possible values are described on official PDF32000_2008 reference. |
float | $x | Abscissa of the upper-left corner of the rectangle |
float | $y | Ordinate of the upper-left corner of the rectangle |
boolean | $js | if true put the field using JavaScript (requires Acrobat Writer to be rendered). public |
Definition at line 14926 of file tcpdf.php.
References $name, $x, $y, and n.
TCPDF::Cell | ( | $w, | |
$h = 0 , |
|||
$txt = '' , |
|||
$border = 0 , |
|||
$ln = 0 , |
|||
$align = '' , |
|||
$fill = false , |
|||
$link = '' , |
|||
$stretch = 0 , |
|||
$ignore_min_height = false , |
|||
$calign = 'T' , |
|||
$valign = 'M' |
|||
) |
Prints a cell (rectangular area) with optional borders, background color and character string.
The upper-left corner of the cell corresponds to the current position. The text can be aligned or centered. After the call, the current position moves to the right or to the next line. It is possible to put a link on the text.
If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting.
float | $w | Cell width. If 0, the cell extends up to the right margin. |
float | $h | Cell height. Default value: 0. |
string | $txt | String to print. Default value: empty string. |
mixed | $border | Indicates if borders must be drawn around the cell. The value can be a number:
|
int | $ln | Indicates where the current position should go after the call. Possible values are:
|
string | $align | Allows to center or align the text. Possible values are:
|
boolean | $fill | Indicates if the cell background must be painted (true) or transparent (false). |
mixed | $link | URL or identifier returned by AddLink(). |
int | $stretch | font stretch mode:
|
boolean | $ignore_min_height | if true ignore automatic minimum height value. |
string | $calign | cell vertical alignment relative to the specified Y value. Possible values are:
|
string | $valign | text vertical alignment inside the cell. Possible values are:
|
Definition at line 5288 of file tcpdf.php.
References $cell_height_ratio, $cell_margin, $cell_padding, $h, $w, _out(), adjustCellPadding(), checkPageBreak(), and getCellCode().
Referenced by Close(), Footer(), Header(), Image(), Text(), and Write().
TCPDF::CheckBox | ( | $name, | |
$w, | |||
$checked = false , |
|||
$prop = array() , |
|||
$opt = array() , |
|||
$onvalue = 'Yes' , |
|||
$x = '' , |
|||
$y = '' , |
|||
$js = false |
|||
) |
Creates a CheckBox field.
string | $name | field name |
int | $w | width |
boolean | $checked | define the initial state. |
array | $prop | javascript field properties. Possible values are described on official Javascript for Acrobat API reference. |
array | $opt | annotation parameters. Possible values are described on official PDF32000_2008 reference. |
string | $onvalue | value to be returned if selected. |
float | $x | Abscissa of the upper-left corner of the rectangle |
float | $y | Ordinate of the upper-left corner of the rectangle |
boolean | $js | if true put the field using JavaScript (requires Acrobat Writer to be rendered). public |
Definition at line 14856 of file tcpdf.php.
|
protected |
Add page if needed.
float | $h | Cell height. Default value: 0. |
mixed | $y | starting y position, leave empty for current position. |
boolean | $addpage | if true add a page, otherwise only return the true/false state |
Definition at line 5208 of file tcpdf.php.
References $h, $page, $tMargin, $x, $y, AcceptPageBreak(), AddPage(), and empty_string().
Referenced by Cell(), fitBlock(), and MultiCell().
|
protected |
Check page for no-write regions and adapt current coordinates and page margins if necessary.
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.
float | $h | height of the text/image/object to print in user units |
float | $x | current X coordinate in user units |
float | $y | current Y coordinate in user units |
Definition at line 23949 of file tcpdf.php.
Referenced by Annotation(), getCellCode(), getRemainingWidth(), Image(), MultiCell(), and Write().
TCPDF::Circle | ( | $x0, | |
$y0, | |||
$r, | |||
$angstr = 0 , |
|||
$angend = 360 , |
|||
$style = '' , |
|||
$line_style = array() , |
|||
$fill_color = array() , |
|||
$nc = 2 |
|||
) |
Draws a circle.
A circle is formed from n Bezier curves.
float | $x0 | Abscissa of center point. |
float | $y0 | Ordinate of center point. |
float | $r | Radius. |
float | $angstr,: | Angle start of draw line. Default value: 0. |
float | $angend,: | Angle finish of draw line. Default value: 360. |
string | $style | Style of rendering. See the getPathPaintOperator() function for more information. |
array | $line_style | Line style of circle. Array like for SetLineStyle. Default value: default line style (empty array). |
array | $fill_color | Fill color. Format: array(red, green, blue). Default value: default color (empty array). |
integer | $nc | Number of curves used to draw a 90 degrees portion of circle. public |
|
protected |
Set a rectangular clipping area.
float | $x | abscissa of the top left corner of the rectangle (or top right corner for RTL mode). |
float | $y | ordinate of the top left corner of the rectangle. |
float | $w | width of the rectangle. |
float | $h | height of the rectangle. |
Definition at line 15917 of file tcpdf.php.
TCPDF::Close | ( | ) |
Terminates the PDF document.
It is not necessary to call this method explicitly because Output() does it automatically. If the document contains no page, AddPage() is called to prevent from getting an invalid document. public
Definition at line 3590 of file tcpdf.php.
References $k, _destroy(), _enddoc(), _out(), AddPage(), Cell(), endPage(), getGraphicVars(), SetAutoPageBreak(), SetFont(), setGraphicVars(), SetTextColor(), and setVisibility().
|
protected |
Process closing tags.
array | $dom | html dom array |
int | $key | current element id |
boolean | $cell | if true add the default left (or right if RTL) padding to each new line (default false). |
int | $maxbottomliney | maximum y value of current line protected |
Definition at line 20734 of file tcpdf.php.
TCPDF::colorRegistrationBar | ( | $x, | |
$y, | |||
$w, | |||
$h, | |||
$transition = true , |
|||
$vertical = false , |
|||
$colors = 'A , |
|||
R | , | ||
G | , | ||
B | , | ||
C | , | ||
M | , | ||
Y | , | ||
K' | |||
) |
Paints color transition registration bars.
float | $x | abscissa of the top left corner of the rectangle. |
float | $y | ordinate of the top left corner of the rectangle. |
float | $w | width of the rectangle. |
float | $h | height of the rectangle. |
boolean | $transition | if true prints tcolor transitions to white. |
boolean | $vertical | if true prints bar vertically. |
string | $colors | colors to print, one letter per color separated by comma (for example 'A,W,R,G,B,C,M,Y,K'): A=black, W=white, R=red, G=green, B=blue, C=cyan, M=magenta, Y=yellow, K=black. |
Definition at line 15592 of file tcpdf.php.
TCPDF::ComboBox | ( | $name, | |
$w, | |||
$h, | |||
$values, | |||
$prop = array() , |
|||
$opt = array() , |
|||
$x = '' , |
|||
$y = '' , |
|||
$js = false |
|||
) |
Creates a Combo-box field.
string | $name | field name |
int | $w | width |
int | $h | height |
array | $values | array containing the list of values. |
array | $prop | javascript field properties. Possible values are described on official Javascript for Acrobat API reference. |
array | $opt | annotation parameters. Possible values are described on official PDF32000_2008 reference. |
float | $x | Abscissa of the upper-left corner of the rectangle |
float | $y | Ordinate of the upper-left corner of the rectangle |
boolean | $js | if true put the field using JavaScript (requires Acrobat Writer to be rendered). public |
Definition at line 14797 of file tcpdf.php.
TCPDF::commitTransaction | ( | ) |
|
protected |
Convert hexadecimal string to string.
string | $bs | byte-string to convert |
Definition at line 12078 of file tcpdf.php.
TCPDF::convertHTMLColorToDec | ( | $color = '#FFFFFF' | ) |
Returns an associative array (keys: R,G,B) from an html color name or a six-digit or three-digit hexadecimal color representation (i.e.
#3FE5AA or #7FF).
string | $color | html color |
Definition at line 11332 of file tcpdf.php.
|
protected |
Convert string to hexadecimal string (byte string)
string | $s | string to convert |
Definition at line 12100 of file tcpdf.php.
|
protected |
Convert SVG transformation matrix to PDF.
array | $tm | original SVG transformation matrix |
Definition at line 24439 of file tcpdf.php.
TCPDF::CoonsPatchMesh | ( | $x, | |
$y, | |||
$w, | |||
$h, | |||
$col1 = array() , |
|||
$col2 = array() , |
|||
$col3 = array() , |
|||
$col4 = array() , |
|||
$coords = array(0.00,0.0,0.33,0.00,0.67,0.00,1.00,0.00,1.00,0.33,1.00,0.67,1.00,1.00,0.67,1.00,0.33,1.00,0.00,1.00,0.00,0.67,0.00,0.33) , |
|||
$coords_min = 0 , |
|||
$coords_max = 1 , |
|||
$antialias = false |
|||
) |
Paints a coons patch mesh.
float | $x | abscissa of the top left corner of the rectangle. |
float | $y | ordinate of the top left corner of the rectangle. |
float | $w | width of the rectangle. |
float | $h | height of the rectangle. |
array | $col1 | first color (lower left corner) (RGB components). |
array | $col2 | second color (lower right corner) (RGB components). |
array | $col3 | third color (upper right corner) (RGB components). |
array | $col4 | fourth color (upper left corner) (RGB components). |
array | $coords |
|
array | $coords_min | 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 | $coords_max | 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 | $antialias | A flag indicating whether to filter the shading function to prevent aliasing artifacts. |
Definition at line 15832 of file tcpdf.php.
TCPDF::copyPage | ( | $page = 0 | ) |
Clone the specified page to a new page.
int | $page | number of page to copy (0 = current page) |
Definition at line 22578 of file tcpdf.php.
TCPDF::cropMark | ( | $x, | |
$y, | |||
$w, | |||
$h, | |||
$type = 'A , |
|||
B | , | ||
C | , | ||
D' | , | ||
$color = array(0,0,0) |
|||
) |
Paints crop mark.
float | $x | abscissa of the crop mark center. |
float | $y | ordinate of the crop mark center. |
float | $w | width of the crop mark. |
float | $h | height of the crop mark. |
string | $type | type of crop mark, one sybol per type separated by comma: A = top left, B = top right, C = bottom left, D = bottom right. |
array | $color | crop mark color (default black). |
Definition at line 15690 of file tcpdf.php.
References $dw, $type, $x, and $y.
TCPDF::Curve | ( | $x0, | |
$y0, | |||
$x1, | |||
$y1, | |||
$x2, | |||
$y2, | |||
$x3, | |||
$y3, | |||
$style = '' , |
|||
$line_style = array() , |
|||
$fill_color = array() |
|||
) |
Draws a Bezier curve.
The Bezier curve is a tangent to the line between the control points at either end of the curve.
float | $x0 | Abscissa of start point. |
float | $y0 | Ordinate of start point. |
float | $x1 | Abscissa of control point 1. |
float | $y1 | Ordinate of control point 1. |
float | $x2 | Abscissa of control point 2. |
float | $y2 | Ordinate of control point 2. |
float | $x3 | Abscissa of end point. |
float | $y3 | Ordinate of end point. |
string | $style | Style of rendering. See the getPathPaintOperator() function for more information. |
array | $line_style | Line style of curve. Array like for SetLineStyle. Default value: default line style (empty array). |
array | $fill_color | Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K). Default value: default color (empty array). public |
Definition at line 12739 of file tcpdf.php.
TCPDF::deletePage | ( | $page | ) |
Remove the specified page.
int | $page | page to remove |
Definition at line 22435 of file tcpdf.php.
|
protected |
Draw an HTML block border and fill.
array | $tag | array of tag properties. |
int | $xmax | end X coordinate for border. protected |
Definition at line 21294 of file tcpdf.php.
TCPDF::Ellipse | ( | $x0, | |
$y0, | |||
$rx, | |||
$ry = '' , |
|||
$angle = 0 , |
|||
$astart = 0 , |
|||
$afinish = 360 , |
|||
$style = '' , |
|||
$line_style = array() , |
|||
$fill_color = array() , |
|||
$nc = 2 |
|||
) |
Draws an ellipse.
An ellipse is formed from n Bezier curves.
float | $x0 | Abscissa of center point. |
float | $y0 | Ordinate of center point. |
float | $rx | Horizontal radius. |
float | $ry | Vertical radius (if ry = 0 then is a circle, see Circle). Default value: 0. |
float | $angle,: | Angle oriented (anti-clockwise). Default value: 0. |
float | $astart,: | Angle start of draw line. Default value: 0. |
float | $afinish,: | Angle finish of draw line. Default value: 360. |
string | $style | Style of rendering. See the getPathPaintOperator() function for more information. |
array | $line_style | Line style of ellipse. Array like for SetLineStyle. Default value: default line style (empty array). |
array | $fill_color | Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K). Default value: default color (empty array). |
integer | $nc | Number of curves used to draw a 90 degrees portion of ellipse. |
Definition at line 12803 of file tcpdf.php.
TCPDF::empty_string | ( | $str | ) |
Determine whether a string is empty.
string | $str | string to be checked |
Definition at line 22998 of file tcpdf.php.
Referenced by AddFont(), Annotation(), checkPageBreak(), GetArrStringWidth(), getCellCode(), getImageFileType(), getNumLines(), MultiCell(), setPageOrientation(), and setTableHeader().
TCPDF::endPage | ( | $tocpage = false | ) |
Terminate the current page.
boolean | $tocpage | if true set the tocpage state to false (end the page used to display Table Of Content). public |
Definition at line 3761 of file tcpdf.php.
References $page, $tocpage, _endpage(), and setFooter().
Referenced by AddPage(), Close(), and endTOCPage().
|
protected |
Sets the closing SVG element handler function for the XML parser.
resource | $parser | The first parameter, parser, is a reference to the XML parser calling the handler. |
string | $name | 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. |
Definition at line 25550 of file tcpdf.php.
References $name.
TCPDF::endTemplate | ( | ) |
End the current XObject Template started with startTemplate() and restore the previous graphic state.
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.
Definition at line 23680 of file tcpdf.php.
TCPDF::endTOCPage | ( | ) |
Terminate the current TOC (Table Of Content) page public.
Definition at line 3722 of file tcpdf.php.
References endPage().
TCPDF::Error | ( | $msg | ) |
This method is automatically called in case of fatal error; it simply outputs the message and halts the execution.
An inherited class may override it to customize the error handling but should always halt the script, or the resulting document would probably be invalid. 2004-06-11 :: Nicola Asuni : changed bold tag with strong
string | $msg | The error message public |
Definition at line 3562 of file tcpdf.php.
References _destroy().
Referenced by _parsejpeg(), _parsepng(), AddFont(), Image(), SetDisplayMode(), SetDrawSpotColor(), SetFillSpotColor(), setPage(), setPageUnit(), and SetTextSpotColor().
|
protected |
Extracts the CSS properties from a CSS string.
string | $cssdata | string containing CSS definitions. |
Definition at line 17269 of file tcpdf.php.
|
protected |
Set the block dimensions accounting for page breaks and page/column fitting.
float | $w | width |
float | $h | height |
float | $x | X coordinate |
float | $y | Y coodiante |
boolean | $fitonpage | if true the block is resized to not exceed page dimensions. protected |
Definition at line 6964 of file tcpdf.php.
References $h, $lMargin, $PageBreakTrigger, $rMargin, $tMargin, $w, $x, $y, and checkPageBreak().
Referenced by Image().
TCPDF::Footer | ( | ) |
This method is used to render the page footer.
It is automatically called by AddPage() and could be overwritten in your own inherited class. public
Definition at line 4011 of file tcpdf.php.
References $barcode, Cell(), getAliasNbPages(), getAliasNumPage(), getBarcode(), getFooterMargin(), getOriginalMargins(), getPageGroupAlias(), getPageNumGroupAlias(), getPageWidth(), getRTL(), getScaleFactor(), GetY(), Ln(), SetLineStyle(), SetTextColor(), SetX(), SetY(), and write1DBarcode().
Referenced by setFooter().
|
protected |
|
protected |
Format the page numbers on the Table Of Content.
This method can be overriden for custom formats.
int | $num | page number protected |
Definition at line 15386 of file tcpdf.php.
TCPDF::get_mqr | ( | ) |
Gets the current active configuration setting of magic_quotes_runtime (if the get_magic_quotes_runtime function exist)
Definition at line 7358 of file tcpdf.php.
Referenced by Image().
TCPDF::GetAbsX | ( | ) |
TCPDF::getAliasNbPages | ( | ) |
Returns the string alias used for the total number of pages.
If the current font is unicode type, the returned string is surrounded by additional curly braces.
Definition at line 15282 of file tcpdf.php.
Referenced by Footer().
TCPDF::getAliasNumPage | ( | ) |
Returns the string alias used for the page number.
If the current font is unicode type, the returned string is surrounded by additional curly braces.
Definition at line 15310 of file tcpdf.php.
Referenced by Footer().
|
protected |
Convert JavaScript form fields properties array to Annotation Properties array.
array | $prop | javascript field properties. Possible values are described on official Javascript for Acrobat API reference. |
Definition at line 14165 of file tcpdf.php.
References $f.
TCPDF::GetArrStringWidth | ( | $sa, | |
$fontname = '' , |
|||
$fontstyle = '' , |
|||
$fontsize = 0 , |
|||
$getarray = false |
|||
) |
Returns the string length of an array of chars in user unit or an array of characters widths.
A font must be selected.
string | $sa | The array of chars whose total length is to be computed |
string | $fontname | 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 | $fontstyle | Font style. Possible values are (case insensitive):
|
float | $fontsize | Font size in points. The default value is the current size. |
boolean | $getarray | if true returns an array of characters widths, if false returns the total length. |
Definition at line 4501 of file tcpdf.php.
References $cw, $FontFamily, $FontSizePt, $FontStyle, $w, empty_string(), GetCharWidth(), SetFont(), and UTF8ArrToLatin1().
Referenced by getCellCode(), getNumLines(), GetStringWidth(), and Write().
TCPDF::getBarcode | ( | ) |
|
protected |
Get the border mode accounting for multicell position (opens bottom side of multicell crossing pages)
mixed | $brd | Indicates if borders must be drawn around the cell block. The value can be a number:
|
string | multicell position: 'start', 'middle', 'end' |
Definition at line 6251 of file tcpdf.php.
Referenced by MultiCell().
|
protected |
Return the starting coordinates to draw an html border.
Definition at line 21278 of file tcpdf.php.
TCPDF::getBreakMargin | ( | $pagenum = '' | ) |
Returns the page break margin.
int | $pagenum | page number (empty = current page) |
Definition at line 3136 of file tcpdf.php.
References $bMargin.
|
protected |
Get buffer content.
Definition at line 22111 of file tcpdf.php.
|
protected |
Returns the code to draw the cell border.
float | $x | X coordinate. |
float | $y | Y coordinate. |
float | $w | Cell width. |
float | $h | Cell height. |
mixed | $brd | Indicates if borders must be drawn around the cell. The value can be a number:
|
string | $mode | border position respect the square edge: normal: centered; ext: external; int: internal; |
Definition at line 5732 of file tcpdf.php.
References $h, $k, $LineWidth, $w, $x, $y, and SetLineStyle().
Referenced by getCellCode().
|
protected |
Returns the PDF string code to print a cell (rectangular area) with optional borders, background color and character string.
The upper-left corner of the cell corresponds to the current position. The text can be aligned or centered. After the call, the current position moves to the right or to the next line. It is possible to put a link on the text.
If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting.
float | $w | Cell width. If 0, the cell extends up to the right margin. |
float | $h | Cell height. Default value: 0. |
string | $txt | String to print. Default value: empty string. |
mixed | $border | Indicates if borders must be drawn around the cell. The value can be a number:
|
int | $ln | Indicates where the current position should go after the call. Possible values are:
|
string | $align | Allows to center or align the text. Possible values are:
|
boolean | $fill | Indicates if the cell background must be painted (true) or transparent (false). |
mixed | $link | URL or identifier returned by AddLink(). |
int | $stretch | font stretch mode:
|
boolean | $ignore_min_height | if true ignore automatic minimum height value. |
string | $calign | cell vertical alignment relative to the specified Y value. Possible values are:
|
string | $valign | text vertical alignment inside the cell. Possible values are:
|
Definition at line 5324 of file tcpdf.php.
References $cell_height_ratio, $cell_margin, $cell_padding, $font_spacing, $font_stretching, $FontAscent, $FontDescent, $FontSize, $h, $k, $lMargin, $rMargin, $unicode, $w, $x, $y, _escape(), adjustCellPadding(), arrUTF8ToUTF16BE(), checkPageRegions(), empty_string(), GetArrStringWidth(), getCellBorder(), GetNumChars(), GetStringWidth(), isUnicodeFont(), K_THAI_TOPCHARS, Link(), removeSHY(), utf8Bidi(), UTF8StringToArray(), and UTF8ToLatin1().
Referenced by Cell(), and MultiCell().
TCPDF::getCellHeightRatio | ( | ) |
TCPDF::getCellMargins | ( | ) |
Get the internal Cell margin array.
Definition at line 3307 of file tcpdf.php.
References $cell_margin.
TCPDF::getCellPaddings | ( | ) |
Get the internal Cell padding array.
Definition at line 3271 of file tcpdf.php.
References $cell_padding.
TCPDF::GetCharWidth | ( | $char, | |
$notlast = true |
|||
) |
Returns the length of the char in user unit for the current font considering current stretching and spacing (tracking/kerning).
int | $char | The char code whose length is to be returned |
boolean | $notlast | set to false for the latest character on string, true otherwise (default) |
Definition at line 4538 of file tcpdf.php.
References $font_spacing, and getRawCharWidth().
Referenced by GetArrStringWidth(), and Write().
TCPDF::getColumn | ( | ) |
Return the current column number.
|
protected |
Returns the border dash style from CSS property.
string | $style | border style to convert |
Definition at line 17569 of file tcpdf.php.
|
protected |
Returns the border style array from CSS border properties.
string | $cssborder | border properties |
Definition at line 17605 of file tcpdf.php.
|
protected |
Returns the border width from CSS property.
string | $width | border width |
|
protected |
Returns the letter-spacing value from CSS value.
string | $spacing | letter-spacing value |
float | $parent | font spacing (tracking/kerning) value of the parent element |
Definition at line 17762 of file tcpdf.php.
|
protected |
Returns the percentage of font stretching from CSS value.
string | $stretch | stretch mode |
float | $parent | stretch value of the parent element |
Definition at line 17793 of file tcpdf.php.
TCPDF::getCSSMargin | ( | $cssmargin, | |
$width = 0 |
|||
) |
Get the internal Cell margin from CSS attribute.
string | $cssmargin | margin properties |
float | $width | width of the containing element public |
Definition at line 17708 of file tcpdf.php.
TCPDF::getCSSPadding | ( | $csspadding, | |
$width = 0 |
|||
) |
Get the internal Cell padding from CSS attribute.
string | $csspadding | padding properties |
float | $width | width of the containing element public |
Definition at line 17655 of file tcpdf.php.
|
protected |
Convert encryption P value to a string of bytes, low-order byte first.
string | $protection | 32bit encryption permission value (P value) |
Definition at line 12117 of file tcpdf.php.
TCPDF::getFontAscent | ( | $font, | |
$style = '' , |
|||
$size = 0 |
|||
) |
Return the font ascent value.
string | $font | font name |
string | $style | font style |
float | $size | The size (in points) |
Definition at line 4947 of file tcpdf.php.
References AddFont(), and getFontBuffer().
|
protected |
Get font buffer content.
string | $font | font key |
Definition at line 22275 of file tcpdf.php.
Referenced by AddFont(), getFontAscent(), getFontDescent(), and SetFont().
TCPDF::getFontDescent | ( | $font, | |
$style = '' , |
|||
$size = 0 |
|||
) |
Return the font descent value.
string | $font | font name |
string | $style | font style |
float | $size | The size (in points) |
Definition at line 4926 of file tcpdf.php.
References AddFont(), and getFontBuffer().
TCPDF::getFontFamily | ( | ) |
Returns the current font family name.
TCPDF::getFontFamilyName | ( | $fontfamily | ) |
Return normalized font name.
string | $fontfamily | property string containing font family names |
Definition at line 23578 of file tcpdf.php.
TCPDF::getFontSize | ( | ) |
Returns the current font size.
TCPDF::getFontSizePt | ( | ) |
Returns the current font size in points unit.
|
protected |
Fill the list of available fonts ($this->fontlist).
protected
Definition at line 4599 of file tcpdf.php.
References $file, and _getfontpath().
Referenced by __construct().
TCPDF::getFontSpacing | ( | ) |
Get the amount to increase or decrease the space between characters in a text.
TCPDF::getFontStretching | ( | ) |
Get the percentage of character stretching.
TCPDF::getFontStyle | ( | ) |
Returns the current font style.
TCPDF::getFontSubsetting | ( | ) |
Return the default option for font subsetting.
TCPDF::getFooterFont | ( | ) |
Get Footer font.
TCPDF::getFooterMargin | ( | ) |
Returns footer margin in user units.
Definition at line 3925 of file tcpdf.php.
References $footer_margin.
Referenced by Footer().
TCPDF::getFormDefaultProp | ( | ) |
Return the default properties for form fields.
|
protected |
|
protected |
Returns current graphic variables as array.
Definition at line 21902 of file tcpdf.php.
Referenced by __construct(), Close(), setFooter(), and startPage().
TCPDF::getGroupPageNo | ( | ) |
Return the current page in the group.
TCPDF::getGroupPageNoFormatted | ( | ) |
Returns the current group page number formatted as a string.
public
TCPDF::getHeaderData | ( | ) |
Returns header data:
Definition at line 3880 of file tcpdf.php.
References $header_logo, $header_logo_width, $header_string, $header_title, and $ret.
Referenced by Header().
TCPDF::getHeaderFont | ( | ) |
TCPDF::getHeaderMargin | ( | ) |
Returns header margin in user units.
Definition at line 3905 of file tcpdf.php.
References $header_margin.
|
protected |
Returns the HTML DOM array.
string | $html | html code |
Definition at line 17863 of file tcpdf.php.
References $name, $pos, $type, and K_SMALL_RATIO.
TCPDF::getHTMLUnitToUnits | ( | $htmlval, | |
$refsize = 1 , |
|||
$defaultunit = 'px' , |
|||
$points = false |
|||
) |
Convert HTML string containing value and unit of measure to user's units or points.
string | $htmlval | string containing values and unit |
string | $refsize | reference value in points |
string | $defaultunit | default unit (can be one of the following: %, em, ex, px, in, mm, pc, pt). |
boolean | $point | if true returns points, otherwise returns value in user's units |
Definition at line 21613 of file tcpdf.php.
References $points.
Referenced by Image().
TCPDF::getHyphenPatternsFromTEX | ( | $file | ) |
Returns an array of hyphenation patterns.
string | $file | TEX file containing hypenation patterns. TEX pattrns can be downloaded from http://www.ctan.org/tex-archive/language/hyph-utf8/tex/generic/hyph-utf8/patterns/ |
Definition at line 23315 of file tcpdf.php.
|
protected |
Get image buffer content.
string | $image | image key |
Definition at line 22213 of file tcpdf.php.
Referenced by Image().
TCPDF::getImageFileType | ( | $imgfile, | |
$iminfo = array() |
|||
) |
Return the image type given the file name or array returned by getimagesize() function.
string | $imgfile | image file name |
array | $iminfo | array of image information returned by getimagesize() function. |
Definition at line 6934 of file tcpdf.php.
References $type, and empty_string().
Referenced by Image().
TCPDF::getImageRBX | ( | ) |
TCPDF::getImageRBY | ( | ) |
TCPDF::getImageScale | ( | ) |
TCPDF::getLastH | ( | ) |
TCPDF::GetLineWidth | ( | ) |
Returns the current the line width.
TCPDF::getMargins | ( | ) |
Returns an array containing current margins:
Definition at line 17186 of file tcpdf.php.
References $ret.
TCPDF::getNumberOfColumns | ( | ) |
Return the current number of columns.
TCPDF::GetNumChars | ( | $s | ) |
Returns the numbero of characters in a string.
string | $s | The input string. |
Definition at line 4587 of file tcpdf.php.
References isUnicodeFont(), and UTF8StringToArray().
Referenced by getCellCode().
TCPDF::getNumLines | ( | $txt, | |
$w = 0 , |
|||
$reseth = false , |
|||
$autopadding = true , |
|||
$cellpadding = '' , |
|||
$border = 0 |
|||
) |
This method return the estimated number of lines for print a simple text string using Multicell() method.
string | $txt | String for calculating his height |
float | $w | Width of cells. If 0, they extend up to the right margin of the page. |
boolean | $reseth | if true reset the last cell height (default false). |
boolean | $autopadding | if true, uses internal padding and automatically adjust it to account for line width (default true). |
float | $cellpadding | Internal cell padding, if empty uses default cell padding. |
mixed | $border | Indicates if borders must be drawn around the cell. The value can be a number:
|
Definition at line 6329 of file tcpdf.php.
References $cell_padding, $lasth, $lMargin, $w, $x, adjustCellPadding(), empty_string(), GetArrStringWidth(), resetLastH(), unichr(), utf8Bidi(), and UTF8StringToArray().
Referenced by getStringHeight().
TCPDF::getNumPages | ( | ) |
Get the total number of insered pages.
Definition at line 3700 of file tcpdf.php.
References $numpages.
Referenced by lastPage().
|
protected |
Returns a temporary filename for caching object on filesystem.
string | $prefix | prefix to add to filename return string filename. protected |
Definition at line 22025 of file tcpdf.php.
References $name, and K_PATH_CACHE.
TCPDF::getOriginalMargins | ( | ) |
Returns an array containing original margins:
Definition at line 17213 of file tcpdf.php.
References $ret.
Referenced by Footer(), and Header().
TCPDF::getPage | ( | ) |
Get current document page number.
Definition at line 3689 of file tcpdf.php.
References $page.
|
protected |
Get page buffer content.
int | $page | page number |
Definition at line 22154 of file tcpdf.php.
Referenced by MultiCell().
TCPDF::getPageDimensions | ( | $pagenum = '' | ) |
Returns an array of page dimensions:
int | $pagenum | page number (empty = current page) |
Definition at line 3088 of file tcpdf.php.
References $page.
TCPDF::getPageGroupAlias | ( | ) |
Return the alias of the current page group If the current font is unicode type, the returned string is surrounded by additional curly braces.
(will be replaced by the total number of pages in this group).
Definition at line 15345 of file tcpdf.php.
Referenced by Footer().
TCPDF::getPageHeight | ( | $pagenum = '' | ) |
Returns the page height in units.
int | $pagenum | page number (empty = current page) |
Definition at line 3120 of file tcpdf.php.
References $h.
TCPDF::getPageNumGroupAlias | ( | ) |
Return the alias for the page number on the current page group If the current font is unicode type, the returned string is surrounded by additional curly braces.
(will be replaced by the total number of pages in this group).
Definition at line 15360 of file tcpdf.php.
Referenced by Footer().
TCPDF::getPageRegions | ( | ) |
Return an array of no-write page regions.
TCPDF::getPageSizeFromFormat | ( | $format | ) |
Get page dimensions from format name.
mixed | $format | The format name. It can be:
|
Definition at line 2259 of file tcpdf.php.
Referenced by setPageFormat().
TCPDF::getPageWidth | ( | $pagenum = '' | ) |
Returns the page width in units.
int | $pagenum | page number (empty = current page) |
Definition at line 3104 of file tcpdf.php.
References $w.
Referenced by Footer().
|
protected |
Get the Path-Painting Operators.
string | $style | Style of rendering. Possible values are:
|
string | $default | default style |
boolean | $mode | if true enable rasterization, false otherwise. |
Definition at line 23426 of file tcpdf.php.
TCPDF::getPDFData | ( | ) |
Returns the PDF data.
public
|
protected |
Returns a string containing random data to be used as a seed for encryption methods.
string | $seed | starting seed value |
Definition at line 11423 of file tcpdf.php.
Referenced by __construct().
TCPDF::getRawCharWidth | ( | $char | ) |
Returns the length of the char in user unit for the current font.
int | $char | The char code whose length is to be returned |
Definition at line 4560 of file tcpdf.php.
Referenced by GetCharWidth().
|
protected |
Returns the remaining width between the current position and margins.
Definition at line 6834 of file tcpdf.php.
References checkPageRegions().
Referenced by Write().
TCPDF::getRTL | ( | ) |
TCPDF::getScaleFactor | ( | ) |
|
protected |
Returns the string used to find spaces.
Definition at line 18630 of file tcpdf.php.
TCPDF::getStringHeight | ( | $w, | |
$txt, | |||
$reseth = false , |
|||
$autopadding = true , |
|||
$cellpadding = '' , |
|||
$border = 0 |
|||
) |
This method return the estimated needed height for print a simple text string in Multicell() method.
Generally, if you want to know the exact height for a block of content you can use the following alternative technique:
// 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='', $y='', $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();
float | $w | Width of cells. If 0, they extend up to the right margin of the page. |
string | $txt | String for calculating his height |
boolean | $reseth | if true reset the last cell height (default false). |
boolean | $autopadding | if true, uses internal padding and automatically adjust it to account for line width (default true). |
float | $cellpadding | Internal cell padding, if empty uses default cell padding. |
mixed | $border | Indicates if borders must be drawn around the cell. The value can be a number:
|
Definition at line 6432 of file tcpdf.php.
References $cell_height_ratio, $cell_padding, $lasth, $w, adjustCellPadding(), and getNumLines().
Referenced by MultiCell().
TCPDF::GetStringWidth | ( | $s, | |
$fontname = '' , |
|||
$fontstyle = '' , |
|||
$fontsize = 0 , |
|||
$getarray = false |
|||
) |
Returns the length of a string in user unit.
A font must be selected.
string | $s | The string whose length is to be computed |
string | $fontname | 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 | $fontstyle | Font style. Possible values are (case insensitive):
|
float | $fontsize | Font size in points. The default value is the current size. |
boolean | $getarray | if true returns an array of characters widths, if false returns the total length. |
Definition at line 4485 of file tcpdf.php.
References GetArrStringWidth(), utf8Bidi(), and UTF8StringToArray().
Referenced by getCellCode().
|
protected |
Get the tranformation matrix from SVG transform attribute.
string | transformation |
Definition at line 24325 of file tcpdf.php.
References $d, $data, $f, $x, and $y.
|
protected |
Returns the styles that apply for the selected HTML tag.
array | $dom | array of HTML tags and properties |
int | $key | key of the current HTML tag |
array | $css | array of CSS properties |
Definition at line 17521 of file tcpdf.php.
|
protected |
Get the product of two SVG tranformation matrices.
array | $ta | first SVG tranformation matrix |
array | $tb | second SVG tranformation matrix |
Definition at line 24421 of file tcpdf.php.
|
protected |
Return the premission code used on encryption (P value).
Array | $permissions | the set of permissions (specify the ones you want to block). |
int | $mode | encryption strength: 0 = RC4 40 bit; 1 = RC4 128 bit; 2 = AES 128 bit; 3 = AES 256 bit. protected |
Definition at line 11939 of file tcpdf.php.
|
protected |
Returns the angle in radiants between two vectors.
int | $x1 | X coordiante of first vector point |
int | $y1 | Y coordiante of first vector point |
int | $x2 | X coordiante of second vector point |
int | $y2 | Y coordiante of second vector point |
Definition at line 25069 of file tcpdf.php.
TCPDF::GetX | ( | ) |
Returns the relative X value of current position.
The value is relative to the left border for LTR languages and to the right border for RTL languages.
Definition at line 7707 of file tcpdf.php.
References $x.
Referenced by MultiCell().
TCPDF::GetY | ( | ) |
TCPDF::Gradient | ( | $type, | |
$coords, | |||
$stops, | |||
$background = array() , |
|||
$antialias = false |
|||
) |
Output gradient.
int | $type | 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 | $coords | array of coordinates. |
array | $stops | 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 | $background | An array of colour components appropriate to the colour space, specifying a single background colour value. |
boolean | $antialias | A flag indicating whether to filter the shading function to prevent aliasing artifacts. |
Definition at line 15941 of file tcpdf.php.
References $type.
TCPDF::Header | ( | ) |
This method is used to render the page header.
It is automatically called by AddPage() and could be overwritten in your own inherited class. public
Definition at line 3969 of file tcpdf.php.
References Cell(), getCellHeightRatio(), getHeaderData(), getHeaderFont(), getImageRBY(), getOriginalMargins(), getRTL(), getScaleFactor(), GetY(), Image(), K_BLANK_IMAGE, K_PATH_IMAGES, MultiCell(), SetFont(), SetLineStyle(), SetTextColor(), SetX(), and SetY().
Referenced by setHeader().
TCPDF::hyphenateText | ( | $text, | |
$patterns, | |||
$dictionary = array() , |
|||
$leftmin = 1 , |
|||
$rightmin = 2 , |
|||
$charmin = 1 , |
|||
$charmax = 8 |
|||
) |
Returns text with soft hyphens.
string | $text | text to process |
mixed | $patterns | 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 | $dictionary | Array of words to be returned without applying the hyphenation algoritm. |
int | $leftmin | Minimum number of character to leave on the left of the word without applying the hyphens. |
int | $rightmin | Minimum number of character to leave on the right of the word without applying the hyphens. |
int | $charmin | Minimum word lenght to apply the hyphenation algoritm. |
int | $charmax | Maximum lenght of broken piece of word. |
Definition at line 23354 of file tcpdf.php.
|
protected |
Returns an array of chars containing soft hyphens.
array | $word | array of chars |
array | $patterns | Array of hypenation patterns. |
array | $dictionary | Array of words to be returned without applying the hyphenation algoritm. |
int | $leftmin | Minimum number of character to leave on the left of the word without applying the hyphens. |
int | $rightmin | Minimum number of character to leave on the right of the word without applying the hyphens. |
int | $charmin | Minimum word lenght to apply the hyphenation algoritm. |
int | $charmax | Maximum lenght of broken piece of word. |
Definition at line 23245 of file tcpdf.php.
References $pos.
TCPDF::Image | ( | $file, | |
$x = '' , |
|||
$y = '' , |
|||
$w = 0 , |
|||
$h = 0 , |
|||
$type = '' , |
|||
$link = '' , |
|||
$align = '' , |
|||
$resize = false , |
|||
$dpi = 300 , |
|||
$palign = '' , |
|||
$ismask = false , |
|||
$imgmask = false , |
|||
$border = 0 , |
|||
$fitbox = false , |
|||
$hidden = false , |
|||
$fitonpage = false |
|||
) |
Puts an image in the page.
The upper-left corner must be given. The dimensions can be specified in different ways:
Supported formats are JPEG and PNG images whitout GD library and all images supported by GD: GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM; The format can be specified explicitly or inferred from the file extension.
It is possible to put a link on the image.
Remark: if an image is used several times, only one copy will be embedded in the file.
string | $file | Name of the file containing the image. |
float | $x | Abscissa of the upper-left corner (LTR) or upper-right corner (RTL). |
float | $y | Ordinate of the upper-left corner (LTR) or upper-right corner (RTL). |
float | $w | Width of the image in the page. If not specified or equal to zero, it is automatically calculated. |
float | $h | Height of the image in the page. If not specified or equal to zero, it is automatically calculated. |
string | $type | 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 | $link | URL or identifier returned by AddLink(). |
string | $align | Indicates the alignment of the pointer next to image insertion relative to image height. The value can be:
|
mixed | $resize | 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). |
int | $dpi | dot-per-inch resolution used on resize |
string | $palign | Allows to center or align the image on the current line. Possible values are:
|
boolean | $ismask | true if this image is a mask, false otherwise |
mixed | $imgmask | image object returned by this function or false |
mixed | $border | Indicates if borders must be drawn around the cell. The value can be a number:
|
boolean | $fitbox | If true scale image dimensions proportionally to fit within the ($w, $h) box. |
boolean | $hidden | if true do not display the image. |
boolean | $fitonpage | if true the image is resized to not exceed page dimensions. |
Definition at line 7041 of file tcpdf.php.
References $dpi, $file, $h, $img, $img_rb_x, $img_rb_y, $k, $lMargin, $numimages, $type, $w, $x, $xobjid, $y, _out(), _parsejpeg(), _setGDImageTransparency(), _toJPEG(), _toPNG(), Cell(), checkPageRegions(), Error(), fitBlock(), get_mqr(), getHTMLUnitToUnits(), getImageBuffer(), getImageFileType(), ImagePngAlpha(), K_PATH_CACHE, Link(), pixelsToUnits(), set_mqr(), setImageBuffer(), and SetY().
Referenced by Annotation(), and Header().
TCPDF::ImageEps | ( | $file, | |
$x = '' , |
|||
$y = '' , |
|||
$w = 0 , |
|||
$h = 0 , |
|||
$link = '' , |
|||
$useBoundingBox = true , |
|||
$align = '' , |
|||
$palign = '' , |
|||
$border = 0 , |
|||
$fitonpage = false |
|||
) |
Embed vector-based Adobe Illustrator (AI) or AI-compatible EPS files.
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).
string | $file | Name of the file containing the image. |
float | $x | Abscissa of the upper-left corner. |
float | $y | Ordinate of the upper-left corner. |
float | $w | Width of the image in the page. If not specified or equal to zero, it is automatically calculated. |
float | $h | Height of the image in the page. If not specified or equal to zero, it is automatically calculated. |
mixed | $link | URL or identifier returned by AddLink(). |
boolean | useBoundingBox specifies whether to position the bounding box (true) or the complete canvas (false) at location (x,y). Default value is true. | |
string | $align | Indicates the alignment of the pointer next to image insertion relative to image height. The value can be:
|
string | $palign | Allows to center or align the image on the current line. Possible values are:
|
mixed | $border | Indicates if borders must be drawn around the cell. The value can be a number:
|
boolean | $fitonpage | if true the image is resized to not exceed page dimensions. |
Definition at line 16289 of file tcpdf.php.
References $cmd, $data, $file, $x, and $y.
|
protected |
Extract info from a PNG image with alpha channel using the GD library.
string | $file | Name of the file containing the image. |
float | $x | Abscissa of the upper-left corner. |
float | $y | Ordinate of the upper-left corner. |
float | $wpx | Original width of the image in pixels. |
float | $hpx | original height of the image in pixels. |
float | $w | Width of the image in the page. If not specified or equal to zero, it is automatically calculated. |
float | $h | Height of the image in the page. If not specified or equal to zero, it is automatically calculated. |
string | $type | 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 | $link | URL or identifier returned by AddLink(). |
string | $align | Indicates the alignment of the pointer next to image insertion relative to image height. The value can be:
|
boolean | $resize | If true resize (reduce) the image to fit $w and $h (requires GD library). |
int | $dpi | dot-per-inch resolution used on resize |
string | $palign | Allows to center or align the image on the current line. Possible values are:
|
Definition at line 7598 of file tcpdf.php.
References $file, $img, $type, $x, $y, and K_PATH_CACHE.
Referenced by Image().
TCPDF::ImageSVG | ( | $file, | |
$x = '' , |
|||
$y = '' , |
|||
$w = 0 , |
|||
$h = 0 , |
|||
$link = '' , |
|||
$align = '' , |
|||
$palign = '' , |
|||
$border = 0 , |
|||
$fitonpage = false |
|||
) |
Embedd a Scalable Vector Graphics (SVG) image.
NOTE: SVG standard is not yet fully implemented, use the setRasterizeVectorImages() method to enable/disable rasterization of vector images using ImageMagick library.
string | $file | Name of the SVG file. |
float | $x | Abscissa of the upper-left corner. |
float | $y | Ordinate of the upper-left corner. |
float | $w | Width of the image in the page. If not specified or equal to zero, it is automatically calculated. |
float | $h | Height of the image in the page. If not specified or equal to zero, it is automatically calculated. |
mixed | $link | URL or identifier returned by AddLink(). |
string | $align | Indicates the alignment of the pointer next to image insertion relative to image height. The value can be:
|
string | $palign | Allows to center or align the image on the current line. Possible values are:
|
mixed | $border | Indicates if borders must be drawn around the cell. The value can be a number:
|
boolean | $fitonpage | if true the image is resized to not exceed page dimensions. |
Definition at line 24035 of file tcpdf.php.
References $f, $file, $x, and $y.
TCPDF::IncludeJS | ( | $script | ) |
TCPDF::intToRoman | ( | $number | ) |
Returns the Roman representation of an integer number.
int | number to convert |
Definition at line 21692 of file tcpdf.php.
TCPDF::isRTLTextDir | ( | ) |
TCPDF::isUnicodeFont | ( | ) |
Return true if the current font is unicode type.
Definition at line 23566 of file tcpdf.php.
Referenced by getCellCode(), GetNumChars(), and Write().
|
protected |
Returns true if the CSS selector is valid for the selected HTML tag.
array | $dom | array of HTML tags and properties |
int | $key | key of the current HTML tag |
string | $selector | CSS selector string |
Definition at line 17361 of file tcpdf.php.
References $attrib, and $valid.
TCPDF::lastPage | ( | $resetmargins = false | ) |
Reset pointer to the last document page.
boolean | $resetmargins | if true reset left, right, top margins and Y position. public |
Definition at line 3678 of file tcpdf.php.
References getNumPages(), and setPage().
TCPDF::Line | ( | $x1, | |
$y1, | |||
$x2, | |||
$y2, | |||
$style = array() |
|||
) |
Draws a line between two points.
float | $x1 | Abscissa of first point. |
float | $y1 | Ordinate of first point. |
float | $x2 | Abscissa of second point. |
float | $y2 | Ordinate of second point. |
array | $style | Line style. Array like for SetLineStyle. Default value: default line style (empty array). public |
Definition at line 12656 of file tcpdf.php.
TCPDF::LinearGradient | ( | $x, | |
$y, | |||
$w, | |||
$h, | |||
$col1 = array() , |
|||
$col2 = array() , |
|||
$coords = array(0,0,1,0) |
|||
) |
Paints a linear colour gradient.
float | $x | abscissa of the top left corner of the rectangle. |
float | $y | ordinate of the top left corner of the rectangle. |
float | $w | width of the rectangle. |
float | $h | height of the rectangle. |
array | $col1 | first color (Grayscale, RGB or CMYK components). |
array | $col2 | second color (Grayscale, RGB or CMYK components). |
array | $coords | 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). |
TCPDF::Link | ( | $x, | |
$y, | |||
$w, | |||
$h, | |||
$link, | |||
$spaces = 0 |
|||
) |
Puts a link on a rectangular area of the page.
Text or image links are generally put via Cell(), Write() or Image(), but this method can be useful for instance to define a clickable area inside an image.
float | $x | Abscissa of the upper-left corner of the rectangle |
float | $y | Ordinate of the upper-left corner of the rectangle |
float | $w | Width of the rectangle |
float | $h | Height of the rectangle |
mixed | $link | URL or identifier returned by AddLink() |
int | $spaces | number of spaces on the text to link public |
Definition at line 5014 of file tcpdf.php.
References $h, $w, $x, $y, and Annotation().
Referenced by getCellCode(), and Image().
TCPDF::ListBox | ( | $name, | |
$w, | |||
$h, | |||
$values, | |||
$prop = array() , |
|||
$opt = array() , |
|||
$x = '' , |
|||
$y = '' , |
|||
$js = false |
|||
) |
Creates a List-box field.
string | $name | field name |
int | $w | width |
int | $h | height |
array | $values | array containing the list of values. |
array | $prop | javascript field properties. Possible values are described on official Javascript for Acrobat API reference. |
array | $opt | annotation parameters. Possible values are described on official PDF32000_2008 reference. |
float | $x | Abscissa of the upper-left corner of the rectangle |
float | $y | Ordinate of the upper-left corner of the rectangle |
boolean | $js | if true put the field using JavaScript (requires Acrobat Writer to be rendered). public |
Definition at line 14739 of file tcpdf.php.
TCPDF::Ln | ( | $h = '' , |
|
$cell = false |
|||
) |
Performs a line break.
The current abscissa goes back to the left margin and the ordinate increases by the amount passed in parameter.
float | $h | The height of the break. By default, the value equals the height of the last printed cell. |
boolean | $cell | if true add the current left (or right o for RTL) padding to the X coordinate public |
Definition at line 7672 of file tcpdf.php.
Referenced by Footer(), and setRTL().
TCPDF::MirrorH | ( | $x = '' | ) |
Horizontal Mirroring.
int | $x | abscissa of the point. Default is current x position public |
Definition at line 12253 of file tcpdf.php.
References $x.
TCPDF::MirrorL | ( | $angle = 0 , |
|
$x = '' , |
|||
$y = '' |
|||
) |
Reflection against a straight line through point (x, y) with the gradient angle (angle).
float | $angle | gradient angle of the straight line. Default is 0 (horizontal line). |
int | $x | abscissa of the point. Default is current x position |
int | $y | ordinate of the point. Default is current y position public |
TCPDF::MirrorP | ( | $x = '' , |
|
$y = '' |
|||
) |
Point reflection mirroring.
int | $x | abscissa of the point. Default is current x position |
int | $y | ordinate of the point. Default is current y position public |
TCPDF::MirrorV | ( | $y = '' | ) |
Verical Mirroring.
int | $y | ordinate of the point. Default is current y position public |
Definition at line 12264 of file tcpdf.php.
References $y.
TCPDF::movePage | ( | $frompage, | |
$topage | |||
) |
Move a page to a previous position.
int | $frompage | number of the source page |
int | $topage | number of the destination page (must be less than $frompage) |
Definition at line 22292 of file tcpdf.php.
TCPDF::MultiCell | ( | $w, | |
$h, | |||
$txt, | |||
$border = 0 , |
|||
$align = 'J' , |
|||
$fill = false , |
|||
$ln = 1 , |
|||
$x = '' , |
|||
$y = '' , |
|||
$reseth = true , |
|||
$stretch = 0 , |
|||
$ishtml = false , |
|||
$autopadding = true , |
|||
$maxh = 0 , |
|||
$valign = 'T' , |
|||
$fitcell = false |
|||
) |
This method allows printing text with line breaks.
They can be automatic (as soon as the text reaches the right border of the cell) or explicit (via the
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.
float | $w | Width of cells. If 0, they extend up to the right margin of the page. |
float | $h | Cell minimum height. The cell extends automatically if needed. |
string | $txt | String to print |
mixed | $border | Indicates if borders must be drawn around the cell. The value can be a number:
|
string | $align | Allows to center or align the text. Possible values are:
|
boolean | $fill | Indicates if the cell background must be painted (true) or transparent (false). |
int | $ln | Indicates where the current position should go after the call. Possible values are:
|
float | $x | x position in user units |
float | $y | y position in user units |
boolean | $reseth | if true reset the last cell height (default true). |
int | $stretch | font stretch mode:
|
boolean | $ishtml | set to true if $txt is HTML content (default = false). |
boolean | $autopadding | if true, uses internal padding and automatically adjust it to account for line width. |
float | $maxh | 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 | $valign | Vertical alignment of text (requires $maxh = $h > 0). Possible values are:
|
boolean | $fitcell | if true attempt to fit all the text within the cell by reducing the font size. |
Definition at line 5935 of file tcpdf.php.
References $bMargin, $cell_margin, $cell_padding, $current_column, $FontSizePt, $h, $lMargin, $num_columns, $page, $rMargin, $skip, $tMargin, $w, $x, $xobjid, $y, adjustCellPadding(), checkPageBreak(), checkPageRegions(), empty_string(), getBorderMode(), getCellCode(), getPageBuffer(), getStringHeight(), GetX(), GetY(), resetLastH(), selectColumn(), setCellMargins(), setContentMark(), SetFontSize(), SetLeftMargin(), setPage(), setPageBuffer(), SetRightMargin(), SetX(), SetY(), Write(), and writeHTML().
Referenced by Header().
TCPDF::objclone | ( | $object | ) |
TCPDF::Open | ( | ) |
This method begins the generation of the PDF document.
It is not necessary to call it explicitly because AddPage() does it automatically. Note: no page is created by this method public
Definition at line 3577 of file tcpdf.php.
Referenced by startPage().
|
protected |
Process opening tags.
array | $dom | html dom array |
int | $key | current element id |
boolean | $cell | if true add the default left (or right if RTL) padding to each new line (default false). protected |
Definition at line 20121 of file tcpdf.php.
References $name, $type, $x, $y, K_PATH_MAIN, K_PATH_URL, and K_TCPDF_CALLS_IN_HTML.
TCPDF::Output | ( | $name = 'doc.pdf' , |
|
$dest = 'I' |
|||
) |
Send the document to a given destination: string, local file or browser.
In the last case, the plug-in may be used (if present) or a download ("Save as" dialog box) may be forced.
The method first calls Close() if necessary to terminate the document.
string | $name | The name of the file when saved. Note that special characters are removed and blanks characters are replaced with the underscore character. |
string | $dest | Destination where to send the document. It can take one of the following values:
|
Definition at line 7826 of file tcpdf.php.
References $f, $name, and K_PATH_CACHE.
TCPDF::PageNo | ( | ) |
Returns the current page number.
Definition at line 4192 of file tcpdf.php.
References $page.
TCPDF::PageNoFormatted | ( | ) |
Returns the current page number formatted as a string.
public
TCPDF::PieSector | ( | $xc, | |
$yc, | |||
$r, | |||
$a, | |||
$b, | |||
$style = 'FD' , |
|||
$cw = true , |
|||
$o = 90 |
|||
) |
Draw the sector of a circle.
It can be used for instance to render pie charts.
float | $xc | abscissa of the center. |
float | $yc | ordinate of the center. |
float | $r | radius. |
float | $a | start angle (in degrees). |
float | $b | end angle (in degrees). |
string | $style | Style of rendering. See the getPathPaintOperator() function for more information. |
float | $cw,: | indicates whether to go clockwise (default: true). |
float | $o,: | origin of angles (0 for 3 o'clock, 90 for noon, 180 for 9 o'clock, 270 for 6 o'clock). Default: 90. |
Definition at line 16228 of file tcpdf.php.
References $cw.
TCPDF::PieSectorXY | ( | $xc, | |
$yc, | |||
$rx, | |||
$ry, | |||
$a, | |||
$b, | |||
$style = 'FD' , |
|||
$cw = false , |
|||
$o = 0 , |
|||
$nc = 2 |
|||
) |
Draw the sector of an ellipse.
It can be used for instance to render pie charts.
float | $xc | abscissa of the center. |
float | $yc | ordinate of the center. |
float | $rx | the x-axis radius. |
float | $ry | the y-axis radius. |
float | $a | start angle (in degrees). |
float | $b | end angle (in degrees). |
string | $style | Style of rendering. See the getPathPaintOperator() function for more information. |
float | $cw,: | indicates whether to go clockwise. |
float | $o,: | origin of angles (0 for 3 o'clock, 90 for noon, 180 for 9 o'clock, 270 for 6 o'clock). |
integer | $nc | Number of curves used to draw a 90 degrees portion of arc. |
Definition at line 16249 of file tcpdf.php.
TCPDF::pixelsToUnits | ( | $px | ) |
Converts pixels to User's Units.
int | $px | pixels |
Definition at line 11398 of file tcpdf.php.
Referenced by Image().
TCPDF::Polycurve | ( | $x0, | |
$y0, | |||
$segments, | |||
$style = '' , |
|||
$line_style = array() , |
|||
$fill_color = array() |
|||
) |
Draws a poly-Bezier curve.
Each Bezier curve segment is a tangent to the line between the control points at either end of the curve.
float | $x0 | Abscissa of start point. |
float | $y0 | Ordinate of start point. |
float | $segments | An array of bezier descriptions. Format: array(x1, y1, x2, y2, x3, y3). |
string | $style | Style of rendering. See the getPathPaintOperator() function for more information. |
array | $line_style | Line style of curve. Array like for SetLineStyle. Default value: default line style (empty array). |
array | $fill_color | Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K). Default value: default color (empty array). public |
Definition at line 12766 of file tcpdf.php.
TCPDF::Polygon | ( | $p, | |
$style = '' , |
|||
$line_style = array() , |
|||
$fill_color = array() , |
|||
$closed = true |
|||
) |
Draws a polygon.
array | $p | Points 0 to ($np - 1). Array with values (x0, y0, x1, y1,..., x(np-1), y(np - 1)) |
string | $style | Style of rendering. See the getPathPaintOperator() function for more information. |
array | $line_style | Line style of polygon. Array with keys among the following:
|
array | $fill_color | Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K). Default value: default color (empty array). |
boolean | $closed | if true the polygon is closes, otherwise will remain open public |
Definition at line 12971 of file tcpdf.php.
TCPDF::PolyLine | ( | $p, | |
$style = '' , |
|||
$line_style = array() , |
|||
$fill_color = array() |
|||
) |
Draws a polygonal line.
array | $p | Points 0 to ($np - 1). Array with values (x0, y0, x1, y1,..., x(np-1), y(np - 1)) |
string | $style | Style of rendering. See the getPathPaintOperator() function for more information. |
array | $line_style | Line style of polygon. Array with keys among the following:
|
array | $fill_color | Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K). Default value: default color (empty array). |
boolean | $closed | if true the polygon is closes, otherwise will remain open public |
TCPDF::printTemplate | ( | $id, | |
$x = '' , |
|||
$y = '' , |
|||
$w = 0 , |
|||
$h = 0 , |
|||
$align = '' , |
|||
$palign = '' , |
|||
$fitonpage = false |
|||
) |
Print an XObject Template.
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.
string | $id | The ID of XObject Template to print. |
int | $x | X position in user units (empty string = current x position) |
int | $y | Y position in user units (empty string = current y position) |
int | $w | Width in user units (zero = remaining page width) |
int | $h | Height in user units (zero = remaining page height) |
string | $align | Indicates the alignment of the pointer next to template insertion relative to template height. The value can be:
|
string | $palign | Allows to center or align the template on the current line. Possible values are:
|
boolean | $fitonpage | if true the template is resized to not exceed page dimensions. |
Definition at line 23709 of file tcpdf.php.
|
protected |
Output an HTML list bullet or ordered item symbol.
int | $listdepth | list nesting level |
string | $listtype | type of list |
float | $size | current font size protected |
Definition at line 21757 of file tcpdf.php.
TCPDF::RadialGradient | ( | $x, | |
$y, | |||
$w, | |||
$h, | |||
$col1 = array() , |
|||
$col2 = array() , |
|||
$coords = array(0.5,0.5,0.5,0.5,1) |
|||
) |
Paints a radial colour gradient.
float | $x | abscissa of the top left corner of the rectangle. |
float | $y | ordinate of the top left corner of the rectangle. |
float | $w | width of the rectangle. |
float | $h | height of the rectangle. |
array | $col1 | first color (Grayscale, RGB or CMYK components). |
array | $col2 | second color (Grayscale, RGB or CMYK components). |
array | $coords | 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. |
TCPDF::RadioButton | ( | $name, | |
$w, | |||
$prop = array() , |
|||
$opt = array() , |
|||
$onvalue = 'On' , |
|||
$checked = false , |
|||
$x = '' , |
|||
$y = '' , |
|||
$js = false |
|||
) |
Creates a RadioButton field.
string | $name | field name |
int | $w | width |
array | $prop | javascript field properties. Possible values are described on official Javascript for Acrobat API reference. |
array | $opt | annotation parameters. Possible values are described on official PDF32000_2008 reference. |
string | $onvalue | value to be returned if selected. |
boolean | $checked | define the initial state. |
float | $x | Abscissa of the upper-left corner of the rectangle |
float | $y | Ordinate of the upper-left corner of the rectangle |
boolean | $js | if true put the field using JavaScript (requires Acrobat Writer to be rendered). public |
Definition at line 14647 of file tcpdf.php.
References $name, $x, $y, and n.
|
protected |
TCPDF::Rect | ( | $x, | |
$y, | |||
$w, | |||
$h, | |||
$style = '' , |
|||
$border_style = array() , |
|||
$fill_color = array() |
|||
) |
Draws a rectangle.
float | $x | Abscissa of upper-left corner (or upper-right corner for RTL language). |
float | $y | Ordinate of upper-left corner (or upper-right corner for RTL language). |
float | $w | Width. |
float | $h | Height. |
string | $style | Style of rendering. See the getPathPaintOperator() function for more information. |
array | $border_style | Border style of rectangle. Array with keys among the following:
|
array | $border_style | Border style of rectangle. Array like for SetLineStyle. Default value: default line style (empty array). |
array | $fill_color | Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K). Default value: default color (empty array). public |
Definition at line 12684 of file tcpdf.php.
TCPDF::registrationMark | ( | $x, | |
$y, | |||
$r, | |||
$double = false , |
|||
$cola = array(0,0,0) , |
|||
$colb = array(255,255,255) |
|||
) |
Paints a registration mark.
float | $x | abscissa of the registration mark center. |
float | $y | ordinate of the registration mark center. |
float | $r | radius of the crop mark. |
boolean | $double | if true print two concentric crop marks. |
array | $cola | crop mark color (default black). |
array | $colb | second crop mark color. |
Definition at line 15760 of file tcpdf.php.
TCPDF::RegularPolygon | ( | $x0, | |
$y0, | |||
$r, | |||
$ns, | |||
$angle = 0 , |
|||
$draw_circle = false , |
|||
$style = '' , |
|||
$line_style = array() , |
|||
$fill_color = array() , |
|||
$circle_style = '' , |
|||
$circle_outLine_style = array() , |
|||
$circle_fill_color = array() |
|||
) |
Draws a regular polygon.
float | $x0 | Abscissa of center point. |
float | $y0 | Ordinate of center point. |
float | $r,: | Radius of inscribed circle. |
integer | $ns | Number of sides. |
float | $angle | Angle oriented (anti-clockwise). Default value: 0. |
boolean | $draw_circle | Draw inscribed circle or not. Default value: false. |
string | $style | Style of rendering. See the getPathPaintOperator() function for more information. |
array | $line_style | Line style of polygon sides. Array with keys among the following:
|
array | $fill_color | Fill color. Format: array(red, green, blue). Default value: default color (empty array). |
string | $circle_style | Style of rendering of inscribed circle (if draws). Possible values are:
|
array | $circle_outLine_style | Line style of inscribed circle (if draws). Array like for SetLineStyle. Default value: default line style (empty array). |
array | $circle_fill_color | Fill color of inscribed circle (if draws). Format: array(red, green, blue). Default value: default color (empty array). public |
Definition at line 13069 of file tcpdf.php.
TCPDF::removePageRegion | ( | $key | ) |
Remove a single no-write region.
int | $key | region key |
Definition at line 23932 of file tcpdf.php.
TCPDF::removeSHY | ( | $txt = '' | ) |
Removes SHY characters from text.
Unicode Data:
string | $txt | input string |
Definition at line 5261 of file tcpdf.php.
Referenced by getCellCode().
|
protected |
Replace the buffer content.
string | $data | data protected |
Definition at line 22093 of file tcpdf.php.
References $data.
TCPDF::resetLastH | ( | ) |
Reset the last cell height.
public
Definition at line 3043 of file tcpdf.php.
References $cell_height_ratio.
Referenced by getNumLines(), and MultiCell().
TCPDF::revstrpos | ( | $haystack, | |
$needle, | |||
$offset = 0 |
|||
) |
Find position of last occurrence of a substring in a string.
string | $haystack | The string to search in. |
string | $needle | substring to search. |
int | $offset | May be specified to begin searching an arbitrary number of characters into the string. |
Definition at line 23011 of file tcpdf.php.
References $pos.
|
protected |
Binary-safe and URL-safe file read.
Reads up to length bytes from the file pointer referenced by handle. Reading stops as soon as one of the following conditions is met: length bytes have been read; EOF (end of file) is reached.
resource | $handle | |
int | $length |
Definition at line 7566 of file tcpdf.php.
References $data, $handle, and $rest.
Referenced by _parsepng().
TCPDF::rollbackTransaction | ( | $self = false | ) |
This method allows to undo the latest transaction by returning the latest saved TCPDF object with startTransaction().
boolean | $self | if true restores current class object to previous state without the need of reassignment via the returned value. |
Definition at line 22958 of file tcpdf.php.
References $file, and $handle.
TCPDF::Rotate | ( | $angle, | |
$x = '' , |
|||
$y = '' |
|||
) |
Rotate object.
float | $angle | angle in degrees for counter-clockwise rotation |
int | $x | abscissa of the rotation center. Default is current x position |
int | $y | ordinate of the rotation center. Default is current y position public |
Definition at line 12346 of file tcpdf.php.
TCPDF::RoundedRect | ( | $x, | |
$y, | |||
$w, | |||
$h, | |||
$r, | |||
$round_corner = '1111' , |
|||
$style = '' , |
|||
$border_style = array() , |
|||
$fill_color = array() |
|||
) |
Draws a rounded rectangle.
float | $x | Abscissa of upper-left corner. |
float | $y | Ordinate of upper-left corner. |
float | $w | Width. |
float | $h | Height. |
float | $r | the radius of the circle used to round off the corners of the rectangle. |
string | $round_corner | 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 left, top right, bottom right and bottom left. Default value: all rounded corner ("1111"). |
string | $style | Style of rendering. See the getPathPaintOperator() function for more information. |
array | $border_style | Border style of rectangle. Array like for SetLineStyle. Default value: default line style (empty array). |
array | $fill_color | Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K). Default value: default color (empty array). public |
Definition at line 13159 of file tcpdf.php.
TCPDF::RoundedRectXY | ( | $x, | |
$y, | |||
$w, | |||
$h, | |||
$rx, | |||
$ry, | |||
$round_corner = '1111' , |
|||
$style = '' , |
|||
$border_style = array() , |
|||
$fill_color = array() |
|||
) |
Draws a rounded rectangle.
float | $x | Abscissa of upper-left corner. |
float | $y | Ordinate of upper-left corner. |
float | $w | Width. |
float | $h | Height. |
float | $rx | the x-axis radius of the ellipse used to round off the corners of the rectangle. |
float | $ry | the y-axis radius of the ellipse used to round off the corners of the rectangle. |
string | $round_corner | 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 left, top right, bottom right and bottom left. Default value: all rounded corner ("1111"). |
string | $style | Style of rendering. See the getPathPaintOperator() function for more information. |
array | $border_style | Border style of rectangle. Array like for SetLineStyle. Default value: default line style (empty array). |
array | $fill_color | Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K). Default value: default color (empty array). public |
Definition at line 13178 of file tcpdf.php.
TCPDF::Scale | ( | $s_x, | |
$s_y, | |||
$x = '' , |
|||
$y = '' |
|||
) |
Vertical and horizontal non-proportional Scaling.
float | $s_x | scaling factor for width as percent. 0 is not allowed. |
float | $s_y | scaling factor for height as percent. 0 is not allowed. |
int | $x | abscissa of the scaling center. Default is current x position |
int | $y | ordinate of the scaling center. Default is current y position public |
Definition at line 12220 of file tcpdf.php.
TCPDF::ScaleX | ( | $s_x, | |
$x = '' , |
|||
$y = '' |
|||
) |
Horizontal Scaling.
float | $s_x | scaling factor for width as percent. 0 is not allowed. |
int | $x | abscissa of the scaling center. Default is current x position |
int | $y | ordinate of the scaling center. Default is current y position public |
TCPDF::ScaleXY | ( | $s, | |
$x = '' , |
|||
$y = '' |
|||
) |
Vertical and horizontal proportional Scaling.
float | $s | scaling factor for width and height as percent. 0 is not allowed. |
int | $x | abscissa of the scaling center. Default is current x position |
int | $y | ordinate of the scaling center. Default is current y position public |
TCPDF::ScaleY | ( | $s_y, | |
$x = '' , |
|||
$y = '' |
|||
) |
Vertical Scaling.
float | $s_y | scaling factor for height as percent. 0 is not allowed. |
int | $x | abscissa of the scaling center. Default is current x position |
int | $y | ordinate of the scaling center. Default is current y position public |
|
protected |
Sets the character data handler function for the XML parser.
resource | $parser | The first parameter, parser, is a reference to the XML parser calling the handler. |
string | $data | The second parameter, data, contains the character data as a string. |
Definition at line 25619 of file tcpdf.php.
References $data.
TCPDF::selectColumn | ( | $col = '' | ) |
Set position at a given column.
int | $col | column number (from 0 to getNumberOfColumns()-1); empty string = current column. public |
Definition at line 23074 of file tcpdf.php.
Referenced by AcceptPageBreak(), and MultiCell().
TCPDF::serializeTCPDFtagParameters | ( | $pararray | ) |
TCPDF::set_mqr | ( | $mqr | ) |
Sets the current active configuration setting of magic_quotes_runtime (if the set_magic_quotes_runtime function exist)
boolean | $mqr | FALSE for off, TRUE for on. |
Definition at line 7343 of file tcpdf.php.
Referenced by Image().
TCPDF::setAlpha | ( | $alpha, | |
$bm = 'Normal' |
|||
) |
Set alpha for stroking (CA) and non-stroking (ca) operations.
float | $alpha | real value from 0 (transparent) to 1 (opaque) |
string | $bm | blend mode, one of the following: Normal, Multiply, Screen, Overlay, Darken, Lighten, ColorDodge, ColorBurn, HardLight, SoftLight, Difference, Exclusion, Hue, Saturation, Color, Luminosity public |
Definition at line 15509 of file tcpdf.php.
TCPDF::SetAuthor | ( | $author | ) |
Defines the author of the document.
string | $author | The name of the author. public |
Definition at line 3526 of file tcpdf.php.
References $author.
TCPDF::SetAutoPageBreak | ( | $auto, | |
$margin = 0 |
|||
) |
Enables or disables the automatic page breaking mode.
When enabling, the second parameter is the distance from the bottom of the page that defines the triggering limit. By default, the mode is on and the margin is 2 cm.
boolean | $auto | Boolean indicating if mode should be on or off. |
float | $margin | Distance from the bottom of the page. public |
Definition at line 3393 of file tcpdf.php.
Referenced by __construct(), Close(), setPage(), and setPageOrientation().
TCPDF::setBarcode | ( | $bc = '' | ) |
TCPDF::SetBooklet | ( | $booklet = true , |
|
$inner = -1 , |
|||
$outer = -1 |
|||
) |
Set the booklet mode for double-sided pages.
boolean | $booklet | true set the booklet mode on, false otherwise. |
float | $inner | Inner page margin. |
float | $outer | Outer page margin. public |
Definition at line 21527 of file tcpdf.php.
|
protected |
Set buffer content (always append data).
string | $data | data protected |
Definition at line 22075 of file tcpdf.php.
References $data.
TCPDF::setCellHeightRatio | ( | $h | ) |
TCPDF::setCellMargins | ( | $left = '' , |
|
$top = '' , |
|||
$right = '' , |
|||
$bottom = '' |
|||
) |
Set the internal Cell margins.
float | $left | left margin |
float | $top | top margin |
float | $right | right margin |
float | $bottom | bottom margin public |
Definition at line 3285 of file tcpdf.php.
Referenced by __construct(), and MultiCell().
TCPDF::SetCellPadding | ( | $pad | ) |
Set the same internal Cell padding for top, right, bottom, left-.
float | $pad | internal padding. public |
Definition at line 3230 of file tcpdf.php.
Referenced by setFooter(), setHeader(), and Write().
TCPDF::setCellPaddings | ( | $left = '' , |
|
$top = '' , |
|||
$right = '' , |
|||
$bottom = '' |
|||
) |
Set the internal Cell paddings.
float | $left | left padding |
float | $top | top padding |
float | $right | right padding |
float | $bottom | bottom padding public |
Definition at line 3249 of file tcpdf.php.
Referenced by __construct().
TCPDF::setColumnsArray | ( | $columns | ) |
Set columns array.
Each column is represented by and array with the following keys: (w = width, s = space between columns, y = column top position).
array | $columns | public |
Definition at line 23061 of file tcpdf.php.
TCPDF::SetCompression | ( | $compress | ) |
Activates or deactivates page compression.
When activated, the internal representation of each page is compressed, which leads to a compression ratio of about 2 for the resulting document. Compression is on by default. Note: the Zlib extension is required for this feature. If not present, compression will be turned off.
boolean | $compress | Boolean indicating if compression must be enabled. public |
Definition at line 3486 of file tcpdf.php.
References $compress.
Referenced by __construct().
|
protected |
Set start-writing mark on selected page.
Borders and fills are always created after content and inserted on the position marked by this method.
int | $page | page number (default is the current page) protected |
Definition at line 3847 of file tcpdf.php.
References $page.
Referenced by MultiCell(), and setPageMark().
TCPDF::SetCreator | ( | $creator | ) |
Defines the creator of the document.
This is typically the name of the application that generates the PDF.
string | $creator | The name of the creator. public |
Definition at line 3550 of file tcpdf.php.
References $creator.
TCPDF::SetDefaultMonospacedFont | ( | $font | ) |
TCPDF::setDefaultTableColumns | ( | $cols = 4 | ) |
TCPDF::SetDisplayMode | ( | $zoom, | |
$layout = 'SinglePage' , |
|||
$mode = 'UseNone' |
|||
) |
Defines the way the document is to be displayed by the viewer.
mixed | $zoom | The zoom to use. It can be one of the following string values or a number indicating the zooming factor to use.
|
string | $layout | The page layout. Possible values are:
|
string | $mode | A name object specifying how the document should be displayed when opened:
|
Definition at line 3408 of file tcpdf.php.
References Error().
Referenced by __construct().
TCPDF::SetDrawColor | ( | $col1 = 0 , |
|
$col2 = -1 , |
|||
$col3 = -1 , |
|||
$col4 = -1 , |
|||
$ret = false |
|||
) |
Defines the color used for all drawing operations (lines, rectangles and cell borders).
It can be expressed in RGB components or gray scale. The method can be called before the first page is created and the value is retained from page to page.
int | $col1 | Gray level for single color, or Red color for RGB, or Cyan color for CMYK. Value between 0 and 255 |
int | $col2 | Green color for RGB, or Magenta color for CMYK. Value between 0 and 255 |
int | $col3 | Blue color for RGB, or Yellow color for CMYK. Value between 0 and 255 |
int | $col4 | Key (Black) color for CMYK. Value between 0 and 255 |
boolean | $ret | if true do not send the command. |
Definition at line 4252 of file tcpdf.php.
References $DrawColor, $ret, and _out().
Referenced by SetDrawColorArray().
TCPDF::SetDrawColorArray | ( | $color, | |
$ret = false |
|||
) |
Defines the color used for all drawing operations (lines, rectangles and cell borders).
It can be expressed in RGB components or gray scale. The method can be called before the first page is created and the value is retained from page to page.
array | $color | array of colors |
boolean | $ret | if true do not send the command. |
Definition at line 4226 of file tcpdf.php.
References $k, $ret, and SetDrawColor().
TCPDF::SetDrawSpotColor | ( | $name, | |
$tint = 100 |
|||
) |
Defines the spot color used for all drawing operations (lines, rectangles and cell borders).
string | $name | name of the spot color |
int | $tint | the intensity of the color (from 0 to 100 ; 100 = full intensity by default). public |
Definition at line 4297 of file tcpdf.php.
References $name, _out(), and Error().
TCPDF::setEqualColumns | ( | $numcols = 0 , |
|
$width = 0 , |
|||
$y = '' |
|||
) |
Set multiple columns of the same size.
int | $numcols | number of columns (set to zero to disable columns mode) |
int | $width | column width |
int | $y | column starting Y position (leave empty for current Y position) public |
Definition at line 23028 of file tcpdf.php.
|
protected |
TCPDF::SetFillColor | ( | $col1 = 0 , |
|
$col2 = -1 , |
|||
$col3 = -1 , |
|||
$col4 = -1 |
|||
) |
Defines the color used for all filling operations (filled rectangles and cell backgrounds).
It can be expressed in RGB components or gray scale. The method can be called before the first page is created and the value is retained from page to page.
int | $col1 | Gray level for single color, or Red color for RGB, or Cyan color for CMYK. Value between 0 and 255 |
int | $col2 | Green color for RGB, or Magenta color for CMYK. Value between 0 and 255 |
int | $col3 | Blue color for RGB, or Yellow color for CMYK. Value between 0 and 255 |
int | $col4 | Key (Black) color for CMYK. Value between 0 and 255 public |
Definition at line 4339 of file tcpdf.php.
References $TextColor, and _out().
Referenced by SetFillColorArray().
TCPDF::SetFillColorArray | ( | $color | ) |
Defines the color used for all filling operations (filled rectangles and cell backgrounds).
It can be expressed in RGB components or gray scale. The method can be called before the first page is created and the value is retained from page to page.
array | $color | array of colors public |
Definition at line 4316 of file tcpdf.php.
References $k, and SetFillColor().
TCPDF::SetFillSpotColor | ( | $name, | |
$tint = 100 |
|||
) |
Defines the spot color used for all filling operations (filled rectangles and cell backgrounds).
string | $name | name of the spot color |
int | $tint | the intensity of the color (from 0 to 100 ; 100 = full intensity by default). public |
Definition at line 4381 of file tcpdf.php.
References $name, $TextColor, _out(), and Error().
TCPDF::SetFont | ( | $family, | |
$style = '' , |
|||
$size = 0 , |
|||
$fontfile = '' , |
|||
$subset = 'default' |
|||
) |
Sets the font used to print character strings.
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:
string | $family | Family font. It can be either a name defined by AddFont() or one of the standard Type1 families (case insensitive):
|
string | $style | Font style. Possible values are (case insensitive):
|
float | $size | 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 | $fontfile | The font definition file. By default, the name is built from the family and style, in lower case with no spaces. |
mixed | $subset | 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. |
Definition at line 4861 of file tcpdf.php.
References $FontSizePt, AddFont(), getFontBuffer(), and SetFontSize().
Referenced by __construct(), Close(), GetArrStringWidth(), Header(), setFooter(), and setHeader().
|
protected |
Set font buffer content.
string | $font | font key |
array | $data | font data protected |
Definition at line 22229 of file tcpdf.php.
Referenced by AddFont().
TCPDF::SetFontSize | ( | $size, | |
$out = true |
|||
) |
Defines the size of the current font.
float | $size | The size (in points) |
boolean | $out | if true output the font size command, otherwise only set the font properties. public |
Definition at line 4882 of file tcpdf.php.
References $k, $out, and _out().
Referenced by MultiCell(), and SetFont().
TCPDF::setFontSpacing | ( | $spacing = 0 | ) |
Set the amount to increase or decrease the space between characters in a text.
float | $spacing | amount to increase or decrease the space between characters in a text (0 = default spacing) |
Definition at line 23855 of file tcpdf.php.
TCPDF::setFontStretching | ( | $perc = 100 | ) |
|
protected |
Set font buffer content.
string | $font | font key |
string | $key | font sub-key |
array | $data | font data protected |
Definition at line 22255 of file tcpdf.php.
References $data.
Referenced by AddFont().
TCPDF::setFontSubsetting | ( | $enable = true | ) |
|
protected |
This method is used to render the page footer.
protected
Definition at line 4095 of file tcpdf.php.
References $footer_margin, $lasth, $original_lMargin, $original_rMargin, $page, $thead, $theadMargins, _out(), Footer(), getGraphicVars(), SetCellPadding(), SetFont(), setGraphicVars(), and SetXY().
Referenced by endPage().
TCPDF::setFooterFont | ( | $font | ) |
TCPDF::setFooterMargin | ( | $fm = 10 | ) |
TCPDF::setFormDefaultProp | ( | $prop = array() | ) |
|
protected |
Set graphic variables.
array | $gvars | array of graphic variablesto restore |
boolean | $extended | if true restore extended graphic variables protected |
Definition at line 21962 of file tcpdf.php.
Referenced by Close(), setFooter(), setHeader(), and startPage().
|
protected |
This method is used to render the page header.
protected
Definition at line 4058 of file tcpdf.php.
References $lasth, $original_lMargin, $original_rMargin, $thead, $theadMargins, _out(), Header(), SetCellPadding(), SetFont(), setGraphicVars(), and SetXY().
Referenced by startPage().
TCPDF::setHeaderData | ( | $ln = '' , |
|
$lw = 0 , |
|||
$ht = '' , |
|||
$hs = '' |
|||
) |
Set header data.
string | $ln | header image logo |
string | $lw | header image logo width in mm |
string | $ht | string to print as title on document header |
string | $hs | string to print on document header public |
Definition at line 3866 of file tcpdf.php.
TCPDF::setHeaderFont | ( | $font | ) |
TCPDF::setHeaderMargin | ( | $hm = 10 | ) |
TCPDF::setHtmlLinksStyle | ( | $color = array(0,0,255) , |
|
$fontstyle = 'U' |
|||
) |
TCPDF::setHtmlVSpace | ( | $tagvs | ) |
Set the vertical spaces for HTML tags.
The array must have the following structure (example): $tagvs = array('h1' => array(0 => array('h' => '', 'n' => 2), 1 => array('h' => 1.3, 'n' => 1))); The first array level contains the tag names, the second level contains 0 for opening tags or 1 for closing tags, the third level contains the vertical space unit (h) and the number spaces to add (n). If the h parameter is not specified, default values are used.
array | $tagvs | array of tags and relative vertical spaces. public |
Definition at line 21567 of file tcpdf.php.
|
protected |
Set image buffer content.
string | $image | image key |
array | $data | image data protected |
Definition at line 22170 of file tcpdf.php.
References $data.
Referenced by Image().
TCPDF::setImageScale | ( | $scale | ) |
|
protected |
Set image buffer content for a specified sub-key.
string | $image | image key |
string | $key | image sub-key |
array | $data | image data protected |
Definition at line 22193 of file tcpdf.php.
References $data.
TCPDF::setJPEGQuality | ( | $quality | ) |
TCPDF::SetKeywords | ( | $keywords | ) |
Associates keywords with the document, generally in the form 'keyword1 keyword2 ...'.
string | $keywords | The list of keywords. public |
Definition at line 3538 of file tcpdf.php.
References $keywords.
TCPDF::setLanguageArray | ( | $language | ) |
TCPDF::setLastH | ( | $h | ) |
TCPDF::SetLeftMargin | ( | $margin | ) |
Defines the left margin.
The method can be called before creating the first page. If the current abscissa gets out of page, it is brought back to the margin.
float | $margin | The margin. public |
Definition at line 3186 of file tcpdf.php.
Referenced by MultiCell().
TCPDF::SetLineStyle | ( | $style, | |
$ret = false |
|||
) |
Set line style.
array | $style | Line style. Array with keys among the following:
|
boolean | $ret | if true do not send the command. |
Definition at line 12506 of file tcpdf.php.
Referenced by Footer(), getCellBorder(), and Header().
TCPDF::SetLineWidth | ( | $width | ) |
Defines the line width.
By default, the value equals 0.2 mm. The method can be called before the first page is created and the value is retained from page to page.
float | $width | The width. public |
Definition at line 12463 of file tcpdf.php.
TCPDF::SetLink | ( | $link, | |
$y = 0 , |
|||
$page = -1 |
|||
) |
Defines the page and position a link points to.
int | $link | The link identifier returned by AddLink() |
float | $y | Ordinate of target position; -1 indicates the current position. The default value is 0 (top of page) |
int | $page | Number of target page; -1 indicates the current page. This is the default value public |
TCPDF::setListIndentWidth | ( | $width | ) |
TCPDF::setLIsymbol | ( | $symbol = '!' | ) |
Set the default bullet to be used as LI bullet symbol.
string | $symbol | character or string to be used (legal values are: '' = automatic, '!' = auto bullet, '#' = auto numbering, 'disc', 'disc', 'circle', 'square', '1', 'decimal', 'decimal-leading-zero', 'i', 'lower-roman', 'I', 'upper-roman', 'a', 'lower-alpha', 'lower-latin', 'A', 'upper-alpha', 'upper-latin', 'lower-greek') public |
Definition at line 21488 of file tcpdf.php.
TCPDF::SetMargins | ( | $left, | |
$top, | |||
$right = -1 , |
|||
$keepmargins = false |
|||
) |
Defines the left, top and right margins.
float | $left | Left margin. |
float | $top | Top margin. |
float | $right | Right margin. Default value is the left one. |
boolean | $keepmargins | if true overwrites the default page margins public |
Definition at line 3164 of file tcpdf.php.
References $lMargin, and $rMargin.
Referenced by __construct().
TCPDF::setOpenCell | ( | $isopen | ) |
TCPDF::setPage | ( | $pnum, | |
$resetmargins = false |
|||
) |
Move pointer at the specified document page and update page dimensions.
int | $pnum | page number (1 ... numpages) |
boolean | $resetmargins | if true reset left, right, top margins and Y position. public |
Definition at line 3631 of file tcpdf.php.
References $page, Error(), SetAutoPageBreak(), and SetY().
Referenced by lastPage(), MultiCell(), and startPage().
TCPDF::setPageBoxes | ( | $page, | |
$type, | |||
$llx, | |||
$lly, | |||
$urx, | |||
$ury, | |||
$points = false |
|||
) |
Set page boundaries.
int | $page | page number |
string | $type | valid values are:
|
float | $llx | lower-left x coordinate in user units |
float | $lly | lower-left y coordinate in user units |
float | $urx | upper-right x coordinate in user units |
float | $ury | upper-right y coordinate in user units |
boolean | $points | if true uses user units as unit of measure, otherwise uses PDF points public |
Definition at line 2786 of file tcpdf.php.
References $k, $page, $points, and $type.
Referenced by setPageFormat(), and setPageOrientation().
|
protected |
Set page buffer content.
int | $page | page number |
string | $data | page data |
boolean | $append | if true append data, false replace. protected |
Definition at line 22127 of file tcpdf.php.
References $data.
Referenced by MultiCell().
|
protected |
Change the format of the current page.
mixed | $format | The format used for pages. It can be either: one of the string values specified at getPageSizeFromFormat() documentation or an array of two numners (width, height) or an array containing the following measures and options:
|
string | $orientation | page orientation. Possible values are (case insensitive):
|
Definition at line 2668 of file tcpdf.php.
References $page, getPageSizeFromFormat(), setPageBoxes(), and setPageOrientation().
Referenced by __construct().
TCPDF::setPageMark | ( | ) |
Set start-writing mark on current page stream used to put borders and fills.
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
Definition at line 3834 of file tcpdf.php.
References $page, and setContentMark().
Referenced by startPage().
TCPDF::setPageOrientation | ( | $orientation, | |
$autopagebreak = '' , |
|||
$bottommargin = '' |
|||
) |
Set page orientation.
string | $orientation | page orientation. Possible values are (case insensitive):
|
boolean | $autopagebreak | Boolean indicating if auto-page-break mode should be on or off. |
float | $bottommargin | bottom margin of the page. public |
Definition at line 2835 of file tcpdf.php.
References $AutoPageBreak, $bMargin, $CurOrientation, $fhPt, $fwPt, $h, $hPt, $k, $lMargin, $original_lMargin, $original_rMargin, $page, $rMargin, $tMargin, $w, $wPt, empty_string(), SetAutoPageBreak(), setPageBoxes(), and swapPageBoxCoordinates().
Referenced by setPageFormat(), and setPageUnit().
TCPDF::setPageRegions | ( | $regions = array() | ) |
Set no-write regions on page.
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.
array | $regions | 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. |
Definition at line 23893 of file tcpdf.php.
References $data.
TCPDF::setPageUnit | ( | $unit | ) |
Set the units of measure for the document.
string | $unit | User measure unit. Possible values are:
A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This is a very common unit in typography; font sizes are expressed in that unit. public |
Definition at line 1908 of file tcpdf.php.
References $dpi, Error(), and setPageOrientation().
Referenced by __construct().
TCPDF::setPDFVersion | ( | $version = '1.7' | ) |
TCPDF::setPrintFooter | ( | $val = true | ) |
TCPDF::setPrintHeader | ( | $val = true | ) |
TCPDF::SetProtection | ( | $permissions = array('print', 'modify', 'copy', 'annot-forms', 'fill-forms', 'extract', 'assemble', 'print-high') , |
|
$user_pass = '' , |
|||
$owner_pass = null , |
|||
$mode = 0 , |
|||
$pubkeys = null |
|||
) |
Set document protection Remark: the protection against modification is for people who have the full Acrobat product.
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.
Array | $permissions | the set of permissions (specify the ones you want to block):
|
String | $user_pass | user password. Empty by default. |
String | $owner_pass | owner password. If not specified, a random value is used. |
int | $mode | encryption strength: 0 = RC4 40 bit; 1 = RC4 128 bit; 2 = AES 128 bit; 3 = AES 256 bit. |
String | $pubkeys | array of recipients containing public-key certificates ('c') and permissions ('p'). For example: array(array('c' => 'file://../tcpdf.crt', 'p' => array('print'))) public |
Definition at line 11983 of file tcpdf.php.
TCPDF::setRasterizeVectorImages | ( | $mode | ) |
TCPDF::SetRightMargin | ( | $margin | ) |
Defines the right margin.
The method can be called before creating the first page.
float | $margin | The margin. public |
Definition at line 3216 of file tcpdf.php.
Referenced by MultiCell().
TCPDF::setRTL | ( | $enable, | |
$resetx = true |
|||
) |
Enable or disable Right-To-Left language mode.
Boolean | $enable | if true enable Right-To-Left language mode. |
Boolean | $resetx | if true reset the X position on direction change. public |
Definition at line 2965 of file tcpdf.php.
References Ln().
TCPDF::setSignature | ( | $signing_cert = '' , |
|
$private_key = '' , |
|||
$private_key_password = '' , |
|||
$extracerts = '' , |
|||
$cert_type = 2 , |
|||
$info = array() |
|||
) |
Enable document signature (requires the OpenSSL Library).
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
mixed | $signing_cert | signing certificate (string or filename prefixed with 'file://') |
mixed | $private_key | private key (string or filename prefixed with 'file://') |
string | $private_key_password | password |
string | $extracerts | 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. |
int | $cert_type | 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 | $info | array of option information: Name, Location, Reason, ContactInfo. public |
Definition at line 15199 of file tcpdf.php.
TCPDF::setSignatureAppearance | ( | $x = 0 , |
|
$y = 0 , |
|||
$w = 0 , |
|||
$h = 0 , |
|||
$page = -1 |
|||
) |
Set the digital signature appearance (a cliccable rectangle area to get signature properties)
float | $x | Abscissa of the upper-left corner. |
float | $y | Ordinate of the upper-left corner. |
float | $w | Width of the signature area. |
float | $h | Height of the signature area. |
int | $page | option page number (if < 0 the current page is used). public |
Definition at line 15235 of file tcpdf.php.
TCPDF::setSpacesRE | ( | $re = '/[^\S\xa0]/' | ) |
Set regular expression to detect withespaces or word separators.
The pattern delimiter must be the forward-slash character '/'. Some example patterns are:
Non-Unicode or missing PCRE unicode support: '/[^]/' Unicode and PCRE unicode support: '/[^{Z}]/u' Unicode and PCRE unicode support in Chinese mode: '/[^{Z}{Lo}]/u' if PCRE unicode support is turned ON ( is the negate class of):
{Z} or
{Separator}: any kind of Unicode whitespace or invisible separator.
{Lo} or
{Other_Letter}: a Unicode letter or ideograph that does not have lowercase and uppercase variants.
{Lo} is needed for Chinese characters because are packed next to each other without spaces in between.
string | $re | regular expression (leave empty for default). public |
Definition at line 2940 of file tcpdf.php.
Referenced by __construct().
TCPDF::SetSubject | ( | $subject | ) |
Defines the subject of the document.
string | $subject | The subject. public |
Definition at line 3514 of file tcpdf.php.
References $subject.
|
protected |
Apply the requested SVG styles (*** TO BE COMPLETED ***)
array | $svgstyle | array of SVG styles to apply |
array | $prevsvgstyle | array of previous SVG style |
int | $x | X origin of the bounding box |
int | $y | Y origin of the bounding box |
int | $w | width of the bounding box |
int | $h | height of the bounding box |
string | $clip_function | clip function |
array | $clip_params | array of parameters for clipping function |
Definition at line 24478 of file tcpdf.php.
|
protected |
This method is used to render the table header on new page (if any).
protected
Definition at line 4146 of file tcpdf.php.
References $cell_padding, $lMargin, $page, $rMargin, $tMargin, $y, empty_string(), and writeHTML().
Referenced by startPage().
TCPDF::setTempRTL | ( | $mode | ) |
Force temporary RTL language direction.
mixed | $mode | can be false, 'L' for LTR or 'R' for RTL public |
Definition at line 2991 of file tcpdf.php.
TCPDF::SetTextColor | ( | $col1 = 0 , |
|
$col2 = -1 , |
|||
$col3 = -1 , |
|||
$col4 = -1 |
|||
) |
Defines the color used for text.
It can be expressed in RGB components or gray scale. The method can be called before the first page is created and the value is retained from page to page.
int | $col1 | Gray level for single color, or Red color for RGB, or Cyan color for CMYK. Value between 0 and 255 |
int | $col2 | Green color for RGB, or Magenta color for CMYK. Value between 0 and 255 |
int | $col3 | Blue color for RGB, or Yellow color for CMYK. Value between 0 and 255 |
int | $col4 | Key (Black) color for CMYK. Value between 0 and 255 public |
Definition at line 4423 of file tcpdf.php.
References $TextColor.
Referenced by Close(), Footer(), Header(), and SetTextColorArray().
TCPDF::SetTextColorArray | ( | $color | ) |
Defines the color used for text.
It can be expressed in RGB components or gray scale. The method can be called before the first page is created and the value is retained from page to page.
array | $color | array of colors public |
Definition at line 4400 of file tcpdf.php.
References $k, and SetTextColor().
TCPDF::setTextRenderingMode | ( | $stroke = 0 , |
|
$fill = true , |
|||
$clip = false |
|||
) |
Set Text rendering mode.
int | $stroke | outline size in user units (0 = disable). |
boolean | $fill | if true fills the text (default). |
boolean | $clip | if true activate clipping mode public |
Definition at line 23182 of file tcpdf.php.
Referenced by Text().
TCPDF::SetTextSpotColor | ( | $name, | |
$tint = 100 |
|||
) |
Defines the spot color used for text.
string | $name | name of the spot color |
int | $tint | the intensity of the color (from 0 to 100 ; 100 = full intensity by default). public |
Definition at line 4462 of file tcpdf.php.
References $name, $TextColor, _out(), and Error().
TCPDF::SetTitle | ( | $title | ) |
Defines the title of the document.
string | $title | The title. public |
Definition at line 3502 of file tcpdf.php.
References $title.
TCPDF::SetTopMargin | ( | $margin | ) |
TCPDF::setUserRights | ( | $enable = true , |
|
$document = '/FullSave' , |
|||
$annots = '/Create/Delete/Modify/Copy/Import/Export' , |
|||
$form = '/Add/Delete/FillIn/Import/Export/SubmitStandalone/SpawnTemplate' , |
|||
$signature = '/Modify' , |
|||
$ef = '/Create/Delete/Modify/Import' , |
|||
$formex = '' |
|||
) |
Set User's Rights for PDF Reader WARNING: This is experimental and currently do not work.
Check the PDF Reference 8.7.1 Transform Methods, Table 8.105 Entries in the UR transform parameters dictionary
boolean | $enable | if true enable user's rights on PDF reader |
string | $document | 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 | $annots | 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 | $form | Names specifying additional form-field-related usage rights for the document. Valid names are: /Add/Delete/FillIn/Import/Export/SubmitStandalone/SpawnTemplate |
string | $signature | 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 | $ef | 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 | $formex | 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. public |
Definition at line 15163 of file tcpdf.php.
TCPDF::setViewerPreferences | ( | $preferences | ) |
Set the viewer preferences dictionary controlling the way the document is to be presented on the screen or in print.
(see Section 8.1 of PDF reference, "Viewer Preferences").
array | $preferences | array of options. |
Definition at line 15575 of file tcpdf.php.
TCPDF::setVisibility | ( | $v | ) |
Set the visibility of the successive elements.
This can be useful, for instance, to put a background image or color that will show on screen but won't print.
string | $v | visibility mode. Legal values are: all, print, screen. public |
Definition at line 15420 of file tcpdf.php.
Referenced by Close().
TCPDF::SetX | ( | $x, | |
$rtloff = false |
|||
) |
Defines the abscissa of the current position.
If the passed value is negative, it is relative to the right of the page (or left if language is RTL).
float | $x | The value of the abscissa. |
boolean | $rtloff | if true always uses the page top-left corner as origin of axis. public |
Definition at line 7747 of file tcpdf.php.
References $x.
Referenced by Footer(), Header(), and MultiCell().
TCPDF::SetXY | ( | $x, | |
$y, | |||
$rtloff = false |
|||
) |
Defines the abscissa and ordinate of the current position.
If the passed values are negative, they are relative respectively to the right and bottom of the page.
float | $x | The value of the abscissa. |
float | $y | The value of the ordinate. |
boolean | $rtloff | if true always uses the page top-left corner as origin of axis. public |
Definition at line 7811 of file tcpdf.php.
Referenced by setFooter(), setHeader(), and Text().
TCPDF::SetY | ( | $y, | |
$resetx = true , |
|||
$rtloff = false |
|||
) |
Moves the current abscissa back to the left margin and sets the ordinate.
If the passed value is negative, it is relative to the bottom of the page.
float | $y | The value of the ordinate. |
bool | $resetx | if true (default) reset the X position. |
boolean | $rtloff | if true always uses the page top-left corner as origin of axis. public |
Definition at line 7779 of file tcpdf.php.
References $y.
Referenced by Footer(), Header(), Image(), MultiCell(), setPage(), and startPage().
TCPDF::Skew | ( | $angle_x, | |
$angle_y, | |||
$x = '' , |
|||
$y = '' |
|||
) |
Skew.
float | $angle_x | angle in degrees between -90 (skew to the left) and 90 (skew to the right) |
float | $angle_y | angle in degrees between -90 (skew to the bottom) and 90 (skew to the top) |
int | $x | abscissa of the skewing center. default is current x position |
int | $y | ordinate of the skewing center. default is current y position public |
Definition at line 12403 of file tcpdf.php.
TCPDF::SkewX | ( | $angle_x, | |
$x = '' , |
|||
$y = '' |
|||
) |
Skew horizontally.
float | $angle_x | angle in degrees between -90 (skew to the left) and 90 (skew to the right) |
int | $x | abscissa of the skewing center. default is current x position |
int | $y | ordinate of the skewing center. default is current y position public |
TCPDF::SkewY | ( | $angle_y, | |
$x = '' , |
|||
$y = '' |
|||
) |
Skew vertically.
float | $angle_y | angle in degrees between -90 (skew to the bottom) and 90 (skew to the top) |
int | $x | abscissa of the skewing center. default is current x position |
int | $y | ordinate of the skewing center. default is current y position public |
TCPDF::StarPolygon | ( | $x0, | |
$y0, | |||
$r, | |||
$nv, | |||
$ng, | |||
$angle = 0 , |
|||
$draw_circle = false , |
|||
$style = '' , |
|||
$line_style = array() , |
|||
$fill_color = array() , |
|||
$circle_style = '' , |
|||
$circle_outLine_style = array() , |
|||
$circle_fill_color = array() |
|||
) |
Draws a star polygon.
float | $x0 | Abscissa of center point. |
float | $y0 | Ordinate of center point. |
float | $r | Radius of inscribed circle. |
integer | $nv | Number of vertices. |
integer | $ng | Number of gap (if ($ng % $nv = 1) then is a regular polygon). |
float | $angle,: | Angle oriented (anti-clockwise). Default value: 0. |
boolean | $draw_circle,: | Draw inscribed circle or not. Default value is false. |
string | $style | Style of rendering. See the getPathPaintOperator() function for more information. |
array | $line_style | Line style of polygon sides. Array with keys among the following:
|
array | $fill_color | Fill color. Format: array(red, green, blue). Default value: default color (empty array). |
string | $circle_style | Style of rendering of inscribed circle (if draws). Possible values are:
|
array | $circle_outLine_style | Line style of inscribed circle (if draws). Array like for SetLineStyle. Default value: default line style (empty array). |
array | $circle_fill_color | Fill color of inscribed circle (if draws). Format: array(red, green, blue). Default value: default color (empty array). public |
Definition at line 13117 of file tcpdf.php.
TCPDF::startPage | ( | $orientation = '' , |
|
$format = '' , |
|||
$tocpage = false |
|||
) |
Starts a new page to the document.
The page must be closed using the endPage() function. The origin of the coordinate system is at the top-left corner and increasing ordinates go downwards.
string | $orientation | page orientation. Possible values are (case insensitive):
|
mixed | $format | 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(). public |
Definition at line 3788 of file tcpdf.php.
References $numpages, $page, $tocpage, _beginpage(), getGraphicVars(), Open(), setGraphicVars(), setHeader(), setPage(), setPageMark(), setTableHeader(), SetY(), and swapMargins().
Referenced by AddPage().
TCPDF::startPageGroup | ( | $page = '' | ) |
Create a new page group.
NOTE: call this function before calling AddPage()
int | $page | starting group page (leave empty for next page). public |
|
protected |
Sets the opening SVG element handler function for the XML parser.
(*** TO BE COMPLETED ***)
resource | $parser | The first parameter, parser, is a reference to the XML parser calling the handler. |
string | $name | 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 | $attribs | 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 | $ctm | tranformation matrix for clipping mode (starting transformation matrix). |
Definition at line 25093 of file tcpdf.php.
References $d, $img, $name, $points, $x, $y, K_PATH_MAIN, and K_PATH_URL.
TCPDF::startTemplate | ( | $w = 0 , |
|
$h = 0 |
|||
) |
Start a new XObject 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. Note: X,Y coordinates will be reset to 0,0.
int | $w | Template width in user units (empty string or zero = page width less margins) |
int | $h | Template height in user units (empty string or zero = page height less margins) |
Definition at line 23620 of file tcpdf.php.
References n.
TCPDF::startTransaction | ( | ) |
Stores a copy of the current TCPDF object used for undo operation.
public
Definition at line 22927 of file tcpdf.php.
References $y.
TCPDF::StartTransform | ( | ) |
Starts a 2D tranformation saving current graphic state.
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
Definition at line 12138 of file tcpdf.php.
TCPDF::StopTransform | ( | ) |
Stops a 2D tranformation restoring previous graphic state.
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
Definition at line 12158 of file tcpdf.php.
TCPDF::stringLeftTrim | ( | $str, | |
$replace = '' |
|||
) |
TCPDF::stringRightTrim | ( | $str, | |
$replace = '' |
|||
) |
Right trim the input string.
string | $str | string to trim |
string | $replace | string that replace spaces. |
Definition at line 23540 of file tcpdf.php.
Referenced by Write().
TCPDF::stringTrim | ( | $str, | |
$replace = '' |
|||
) |
Trim the input string.
string | $str | string to trim |
string | $replace | string that replace spaces. |
Definition at line 23553 of file tcpdf.php.
|
protected |
Draws an SVG path.
string | $d | attribute d of the path SVG element |
string | $style | Style of rendering. Possible values are:
|
Definition at line 24749 of file tcpdf.php.
References $cmd, $d, $x, and $y.
|
protected |
Apply SVG graphic transformation matrix.
array | $tm | original SVG transformation matrix protected |
|
protected |
Swap the left and right margins.
boolean | $reverse | if true swap left and right margins. protected |
Definition at line 21543 of file tcpdf.php.
Referenced by startPage().
|
protected |
Swap X and Y coordinates of page boxes (change page boxes orientation).
int | $page | page number protected |
Definition at line 2812 of file tcpdf.php.
Referenced by setPageOrientation().
TCPDF::Text | ( | $x, | |
$y, | |||
$txt, | |||
$fstroke = false , |
|||
$fclip = false , |
|||
$ffill = true , |
|||
$border = 0 , |
|||
$ln = 0 , |
|||
$align = '' , |
|||
$fill = false , |
|||
$link = '' , |
|||
$stretch = 0 , |
|||
$ignore_min_height = false , |
|||
$calign = 'T' , |
|||
$valign = 'M' , |
|||
$rtloff = false |
|||
) |
Prints a text cell at the specified position.
The origin is on the left of the first charcter, on the baseline. This method allows to place a string precisely on the page.
float | $x | Abscissa of the cell origin |
float | $y | Ordinate of the cell origin |
string | $txt | String to print |
int | $fstroke | outline size in user units (false = disable) |
boolean | $fclip | if true activate clipping mode (you must call StartTransform() before this function and StopTransform() to stop the clipping tranformation). |
boolean | $ffill | if true fills the text |
mixed | $border | Indicates if borders must be drawn around the cell. The value can be a number:
|
int | $ln | Indicates where the current position should go after the call. Possible values are:
|
string | $align | Allows to center or align the text. Possible values are:
|
boolean | $fill | Indicates if the cell background must be painted (true) or transparent (false). |
mixed | $link | URL or identifier returned by AddLink(). |
int | $stretch | font stretch mode:
|
boolean | $ignore_min_height | if true ignore automatic minimum height value. |
string | $calign | cell vertical alignment relative to the specified Y value. Possible values are:
|
string | $valign | text vertical alignment inside the cell. Possible values are:
|
boolean | $rtloff | if true uses the page top-left corner as origin of axis for $x and $y initial position. public |
Definition at line 5161 of file tcpdf.php.
References $textrendermode, $textstrokewidth, $x, $y, Cell(), setTextRenderingMode(), and SetXY().
TCPDF::TextField | ( | $name, | |
$w, | |||
$h, | |||
$prop = array() , |
|||
$opt = array() , |
|||
$x = '' , |
|||
$y = '' , |
|||
$js = false |
|||
) |
Creates a text field.
string | $name | field name |
float | $w | Width of the rectangle |
float | $h | Height of the rectangle |
array | $prop | javascript field properties. Possible values are described on official Javascript for Acrobat API reference. |
array | $opt | annotation parameters. Possible values are described on official PDF32000_2008 reference. |
float | $x | Abscissa of the upper-left corner of the rectangle |
float | $y | Ordinate of the upper-left corner of the rectangle |
boolean | $js | if true put the field using JavaScript (requires Acrobat Writer to be rendered). public |
Definition at line 14558 of file tcpdf.php.
|
protected |
Apply graphic transformations.
array | $tm | transformation matrix protected |
Definition at line 12434 of file tcpdf.php.
TCPDF::Translate | ( | $t_x, | |
$t_y | |||
) |
Translate graphic object horizontally and vertically.
int | $t_x | movement to the right |
int | $t_y | movement to the bottom public |
TCPDF::TranslateX | ( | $t_x | ) |
Translate graphic object horizontally.
int | $t_x | movement to the right (or left for RTL) public |
TCPDF::TranslateY | ( | $t_y | ) |
Translate graphic object vertically.
int | $t_y | movement to the bottom public |
TCPDF::unhtmlentities | ( | $text_to_convert | ) |
TCPDF::UniArrSubString | ( | $uniarr, | |
$start = '' , |
|||
$end = '' |
|||
) |
Extract a slice of the $uniarr array and return it as string.
string | $uniarr | The input array of characters. |
int | $start | the starting element of $strarr. |
int | $end | first element that will not be returned. |
Definition at line 6874 of file tcpdf.php.
Referenced by Write().
TCPDF::unichr | ( | $c | ) |
Returns the unicode caracter specified by UTF-8 value.
int | $c | UTF-8 value |
Definition at line 6907 of file tcpdf.php.
Referenced by getNumLines(), UTF8ArrSubString(), and Write().
TCPDF::UTF8ArrayToUniArray | ( | $ta | ) |
Convert an array of UTF8 values to array of unicode characters.
string | $ta | The input array of UTF8 values. |
Definition at line 6895 of file tcpdf.php.
Referenced by Write().
TCPDF::UTF8ArrSubString | ( | $strarr, | |
$start = '' , |
|||
$end = '' |
|||
) |
Extract a slice of the $strarr array and return it as string.
string | $strarr | The input array of characters. |
int | $start | the starting element of $strarr. |
int | $end | first element that will not be returned. |
Definition at line 6851 of file tcpdf.php.
References unichr().
|
protected |
Converts UTF-8 characters array to array of Latin1 characters
array | $unicode | array containing UTF-8 unicode values |
Definition at line 11125 of file tcpdf.php.
Referenced by GetArrStringWidth().
|
protected |
Reverse the RLT substrings using the Bidirectional Algorithm (http://unicode.org/reports/tr9/).
array | $ta | array of characters composing the string. |
string | $str | string to process |
bool | $forcertl | if 'R' forces RTL, if 'L' forces LTR |
Definition at line 13339 of file tcpdf.php.
References $cw, $type, and $x.
Referenced by __construct(), getCellCode(), getNumLines(), GetStringWidth(), and Write().
|
protected |
Reverse the RLT substrings array using the Bidirectional Algorithm (http://unicode.org/reports/tr9/).
array | $arr | array of unicode values. |
string | $str | string to manipulate (or empty value). |
bool | $setbom | if true set the Byte Order Mark (BOM = 0xFEFF) |
bool | $forcertl | if true forces RTL text direction |
|
protected |
Converts UTF-8 strings to codepoints array.
Invalid byte sequences will be replaced with 0xFFFD (replacement character)
Based on: http://www.faqs.org/rfcs/rfc3629.html
Char. number range | UTF-8 octet sequence (hexadecimal) | (binary) --------------------+----------------------------------------------- 0000 0000-0000 007F | 0xxxxxxx 0000 0080-0000 07FF | 110xxxxx 10xxxxxx 0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx 0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx ---------------------------------------------------------------------
ABFN notation: --------------------------------------------------------------------- UTF8-octets = *( UTF8-char ) UTF8-char = UTF8-1 / UTF8-2 / UTF8-3 / UTF8-4 UTF8-1 = x00-7F UTF8-2 = xC2-DF UTF8-tail
UTF8-3 = xE0 xA0-BF UTF8-tail / xE1-EC 2( UTF8-tail ) / xED x80-9F UTF8-tail / xEE-EF 2( UTF8-tail ) UTF8-4 = xF0 x90-BF 2( UTF8-tail ) / xF1-F3 3( UTF8-tail ) / xF4 x80-8F 2( UTF8-tail ) UTF8-tail = x80-BF ---------------------------------------------------------------------
string | $str | string to process. |
Definition at line 10961 of file tcpdf.php.
Referenced by getCellCode(), GetNumChars(), getNumLines(), GetStringWidth(), and Write().
|
protected |
Reverse the RLT substrings using the Bidirectional Algorithm (http://unicode.org/reports/tr9/).
string | $str | string to manipulate. |
bool | $setbom | if true set the Byte Order Mark (BOM = 0xFEFF) |
bool | $forcertl | if true forces RTL text direction |
|
protected |
Converts UTF-8 strings to Latin1 when using the standard 14 core fonts.
string | $str | string to process. |
Definition at line 11096 of file tcpdf.php.
Referenced by getCellCode().
|
protected |
Converts UTF-8 strings to UTF16-BE.
string | $str | string to process. |
boolean | $setbom | if true set the Byte Order Mark (BOM = 0xFEFF) |
Definition at line 11080 of file tcpdf.php.
TCPDF::Write | ( | $h, | |
$txt, | |||
$link = '' , |
|||
$fill = false , |
|||
$align = '' , |
|||
$ln = false , |
|||
$stretch = 0 , |
|||
$firstline = false , |
|||
$firstblock = false , |
|||
$maxh = 0 , |
|||
$wadj = 0 , |
|||
$margin = '' |
|||
) |
This method prints text from the current position.
float | $h | Line height |
string | $txt | String to print |
mixed | $link | URL or identifier returned by AddLink() |
boolean | $fill | Indicates if the cell background must be painted (true) or transparent (false). |
string | $align | Allows to center or align the text. Possible values are:
|
boolean | $ln | if true set cursor at the bottom of the line, otherwise set cursor at the top of the line. |
int | $stretch | font stretch mode:
|
boolean | $firstline | if true prints only the first line and return the remaining string. |
boolean | $firstblock | if true the string is the starting of a line. |
float | $maxh | maximum height. The remaining unprinted text will be returned. It should be >= $h and less then remaining space to the bottom of the page, or 0 for disable this feature. |
float | $wadj | first line width will be reduced by this amount (used in HTML mode). |
array | $margin | margin array of the parent container |
Definition at line 6469 of file tcpdf.php.
References $cell_margin, $cell_padding, $h, $l, $lMargin, $page, $w, $x, AcceptPageBreak(), Cell(), checkPageRegions(), GetArrStringWidth(), GetCharWidth(), getRemainingWidth(), isRTLTextDir(), isUnicodeFont(), SetCellPadding(), stringRightTrim(), UniArrSubString(), unichr(), UTF8ArrayToUniArray(), utf8Bidi(), and UTF8StringToArray().
Referenced by MultiCell().
TCPDF::write1DBarcode | ( | $code, | |
$type, | |||
$x = '' , |
|||
$y = '' , |
|||
$w = '' , |
|||
$h = '' , |
|||
$xres = '' , |
|||
$style = '' , |
|||
$align = '' |
|||
) |
Print a Linear Barcode.
string | $code | code to print |
string | $type | type of barcode (see barcodes.php for supported formats). |
int | $x | x position in user units (empty string = current x position) |
int | $y | y position in user units (empty string = current y position) |
int | $w | width in user units (empty string = remaining page width) |
int | $h | height in user units (empty string = remaining page height) |
float | $xres | width of the smallest bar in user units (empty string = default value = 0.4mm) |
array | $style | array of options:
|
string | $align | Indicates the alignment of the pointer next to barcode insertion relative to barcode height. The value can be:
|
Definition at line 16592 of file tcpdf.php.
Referenced by Footer().
TCPDF::write2DBarcode | ( | $code, | |
$type, | |||
$x = '' , |
|||
$y = '' , |
|||
$w = '' , |
|||
$h = '' , |
|||
$style = '' , |
|||
$align = '' , |
|||
$distort = false |
|||
) |
Print 2D Barcode.
string | $code | code to print |
string | $type | type of barcode (see 2dbarcodes.php for supported formats). |
int | $x | x position in user units |
int | $y | y position in user units |
int | $w | width in user units |
int | $h | height in user units |
array | $style | array of options:
|
string | $align | Indicates the alignment of the pointer next to barcode insertion relative to barcode height. The value can be:
|
boolean | $distort | if true distort the barcode to fit width and height, otherwise preserve aspect ratio |
Definition at line 16963 of file tcpdf.php.
References $cw, $type, $x, and $y.
TCPDF::writeBarcode | ( | $x, | |
$y, | |||
$w, | |||
$h, | |||
$type, | |||
$style, | |||
$font, | |||
$xres, | |||
$code | |||
) |
This function is DEPRECATED, please use the new write1DBarcode() function.
int | $x | x position in user units |
int | $y | y position in user units |
int | $w | width in user units |
int | $h | height position in user units |
string | $type | type of barcode |
string | $style | barcode style |
string | $font | font for text |
int | $xres | x resolution |
string | $code | code to print |
Definition at line 16898 of file tcpdf.php.
|
protected |
Writes data to a temporary file on filesystem.
string | $file | file name |
mixed | $data | data to write on file |
boolean | $append | if true append data, false replace. protected |
Definition at line 22037 of file tcpdf.php.
TCPDF::writeHTML | ( | $html, | |
$ln = true , |
|||
$fill = false , |
|||
$reseth = false , |
|||
$cell = false , |
|||
$align = '' |
|||
) |
Allows to preserve some HTML formatting (limited support).
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
string | $html | text to display |
boolean | $ln | if true add a new line after text (default = true) |
boolean | $fill | Indicates if the background must be painted (true) or transparent (false). |
boolean | $reseth | if true reset the last cell height (default false). |
boolean | $cell | if true add the current left (or right for RTL) padding to each Write (default false). |
string | $align | Allows to center or align the text. Possible values are:
|
Definition at line 18674 of file tcpdf.php.
Referenced by MultiCell(), and setTableHeader().
TCPDF::writeHTMLCell | ( | $w, | |
$h, | |||
$x, | |||
$y, | |||
$html = '' , |
|||
$border = 0 , |
|||
$ln = 0 , |
|||
$fill = false , |
|||
$reseth = true , |
|||
$align = '' , |
|||
$autopadding = true |
|||
) |
Prints a cell (rectangular area) with optional borders, background color and html text string.
The upper-left corner of the cell corresponds to the current position. After the call, the current position moves to the right or to the next line.<br /> If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting. @param float $w Cell width. If 0, the cell extends up to the right margin. @param float $h Cell minimum height. The cell extends automatically if needed. @param float $x upper-left corner X coordinate @param float $y upper-left corner Y coordinate @param string $html html text to print. Default value: empty string. @param mixed $border Indicates if borders must be drawn around the cell. The value can be a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul> or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul> or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) @param int $ln Indicates where the current position should go after the call. Possible values are:<ul><li>0: to the right (or left for RTL language)</li><li>1: to the beginning of the next line</li><li>2: below</li></ul>
Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: 0.
boolean | $fill | Indicates if the cell background must be painted (true) or transparent (false). |
boolean | $reseth | if true reset the last cell height (default true). |
string | $align | Allows to center or align the text. Possible values are:
|
boolean | $autopadding | if true, uses internal padding and automatically adjust it to account for line width. public MultiCell() |
|
protected |
|
protected |
Definition at line 491 of file tcpdf.php.
Referenced by SetAuthor().
|
protected |
Definition at line 449 of file tcpdf.php.
Referenced by AcceptPageBreak(), and setPageOrientation().
|
protected |
Definition at line 283 of file tcpdf.php.
Referenced by getBreakMargin(), MultiCell(), and setPageOrientation().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Maximum size of cache array used for UTF8StringToArray() method.
protected
|
protected |
Current size of cache array used for UTF8StringToArray() method.
protected
|
protected |
|
protected |
Default cell height ratio.
protected
Definition at line 909 of file tcpdf.php.
Referenced by Cell(), getCellCode(), getStringHeight(), and resetLastH().
|
protected |
Definition at line 297 of file tcpdf.php.
Referenced by Cell(), getCellCode(), getCellMargins(), MultiCell(), and Write().
|
protected |
Definition at line 290 of file tcpdf.php.
Referenced by adjustCellPadding(), Cell(), getCellCode(), getCellPaddings(), getNumLines(), getStringHeight(), MultiCell(), setTableHeader(), and Write().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 205 of file tcpdf.php.
Referenced by SetCompression().
|
protected |
Definition at line 503 of file tcpdf.php.
Referenced by SetCreator().
|
protected |
Definition at line 211 of file tcpdf.php.
Referenced by setPageOrientation().
|
protected |
Current column number protected.
Definition at line 1447 of file tcpdf.php.
Referenced by MultiCell().
|
protected |
|
protected |
|
protected |
|
protected |
If true enables disk caching.
protected
Definition at line 1181 of file tcpdf.php.
Referenced by __construct().
|
protected |
Dot Per Inch Document Resolution (do not change) protected.
Definition at line 846 of file tcpdf.php.
Referenced by Image(), and setPageUnit().
|
protected |
Definition at line 425 of file tcpdf.php.
Referenced by SetDrawColor().
|
protected |
|
protected |
|
protected |
Definition at line 729 of file tcpdf.php.
Referenced by __construct().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 235 of file tcpdf.php.
Referenced by setPageOrientation().
|
protected |
|
protected |
|
protected |
Definition at line 1558 of file tcpdf.php.
Referenced by getCellCode(), and GetCharWidth().
|
protected |
Definition at line 1551 of file tcpdf.php.
Referenced by getCellCode().
|
protected |
|
protected |
Definition at line 382 of file tcpdf.php.
Referenced by getCellCode().
|
protected |
Definition at line 389 of file tcpdf.php.
Referenced by getCellCode().
|
protected |
Definition at line 369 of file tcpdf.php.
Referenced by AddFont(), and GetArrStringWidth().
|
protected |
|
protected |
Definition at line 419 of file tcpdf.php.
Referenced by getCellCode().
|
protected |
Definition at line 413 of file tcpdf.php.
Referenced by GetArrStringWidth(), MultiCell(), and SetFont().
|
protected |
Definition at line 375 of file tcpdf.php.
Referenced by GetArrStringWidth().
|
protected |
Definition at line 574 of file tcpdf.php.
Referenced by getFooterMargin(), and setFooter().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 229 of file tcpdf.php.
Referenced by setPageOrientation().
|
protected |
|
protected |
Definition at line 259 of file tcpdf.php.
Referenced by _parsepng(), Annotation(), Cell(), checkPageBreak(), fitBlock(), getCellBorder(), getCellCode(), getPageHeight(), Image(), Link(), MultiCell(), setLastH(), setPageOrientation(), and Write().
|
protected |
Definition at line 630 of file tcpdf.php.
Referenced by getHeaderData().
|
protected |
Definition at line 636 of file tcpdf.php.
Referenced by getHeaderData().
|
protected |
Definition at line 568 of file tcpdf.php.
Referenced by getHeaderMargin().
|
protected |
Definition at line 648 of file tcpdf.php.
Referenced by getHeaderData().
|
protected |
Definition at line 642 of file tcpdf.php.
Referenced by getHeaderData().
|
protected |
Definition at line 247 of file tcpdf.php.
Referenced by setPageOrientation().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 523 of file tcpdf.php.
Referenced by getImageRBX(), and Image().
|
protected |
Definition at line 531 of file tcpdf.php.
Referenced by getImageRBY(), and Image().
|
protected |
Definition at line 539 of file tcpdf.php.
Referenced by getImageScale().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 223 of file tcpdf.php.
Referenced by __construct(), AddSpotColor(), Annotation(), Close(), getCellBorder(), getCellCode(), getScaleFactor(), Image(), SetDrawColorArray(), SetFillColorArray(), SetFontSize(), setPageBoxes(), setPageOrientation(), and SetTextColorArray().
|
protected |
Definition at line 497 of file tcpdf.php.
Referenced by SetKeywords().
|
protected |
|
protected |
|
protected |
Definition at line 315 of file tcpdf.php.
Referenced by getLastH(), getNumLines(), getStringHeight(), setFooter(), and setHeader().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 321 of file tcpdf.php.
Referenced by adjustCellPadding(), and getCellBorder().
|
protected |
|
protected |
Definition at line 265 of file tcpdf.php.
Referenced by AddPage(), fitBlock(), getCellCode(), getNumLines(), Image(), MultiCell(), SetMargins(), setPageOrientation(), setTableHeader(), and Write().
|
protected |
|
protected |
Definition at line 175 of file tcpdf.php.
Referenced by _parsepng(), AddLink(), and Annotation().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Number of colums protected.
Definition at line 1440 of file tcpdf.php.
Referenced by MultiCell().
|
protected |
|
protected |
|
protected |
Counts the number of pages.
protected
Definition at line 1146 of file tcpdf.php.
Referenced by getNumPages(), and startPage().
|
protected |
|
protected |
|
protected |
Definition at line 581 of file tcpdf.php.
Referenced by setFooter(), setHeader(), and setPageOrientation().
|
protected |
Definition at line 588 of file tcpdf.php.
Referenced by setFooter(), setHeader(), and setPageOrientation().
|
protected |
|
protected |
|
protected |
Definition at line 169 of file tcpdf.php.
Referenced by Annotation(), checkPageBreak(), endPage(), getPage(), getPageDimensions(), MultiCell(), PageNo(), setContentMark(), setFooter(), SetLink(), setPage(), setPageBoxes(), setPageFormat(), setPageMark(), setPageOrientation(), setTableHeader(), startPage(), swapPageBoxCoordinates(), and Write().
|
protected |
|
protected |
Definition at line 455 of file tcpdf.php.
Referenced by fitBlock().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 277 of file tcpdf.php.
Referenced by AddPage(), fitBlock(), getCellCode(), MultiCell(), SetMargins(), setPageOrientation(), and setTableHeader().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 485 of file tcpdf.php.
Referenced by SetSubject().
|
protected |
|
protected |
|
protected |
Definition at line 437 of file tcpdf.php.
Referenced by SetFillColor(), SetFillSpotColor(), SetTextColor(), and SetTextSpotColor().
|
protected |
|
protected |
Text rendering mode: 0 = Fill text; 1 = Stroke text; 2 = Fill, then stroke text; 3 = Neither fill nor stroke text (invisible); 4 = Fill text and add to path for clipping; 5 = Stroke text and add to path for clipping; 6 = Fill, then stroke text and add to path for clipping; 7 = Add text to path for clipping.
protected
Definition at line 1475 of file tcpdf.php.
Referenced by Text().
|
protected |
|
protected |
Table header content to be repeated on each new page protected.
Definition at line 1237 of file tcpdf.php.
Referenced by setFooter(), and setHeader().
|
protected |
Margins used for table header.
protected
Definition at line 1244 of file tcpdf.php.
Referenced by setFooter(), and setHeader().
|
protected |
Definition at line 479 of file tcpdf.php.
Referenced by SetTitle().
|
protected |
Definition at line 271 of file tcpdf.php.
Referenced by checkPageBreak(), fitBlock(), MultiCell(), setPageOrientation(), and setTableHeader().
|
protected |
Definition at line 1502 of file tcpdf.php.
Referenced by AddPage(), endPage(), and startPage().
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 555 of file tcpdf.php.
Referenced by __construct(), and getCellCode().
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 253 of file tcpdf.php.
Referenced by _parsepng(), Annotation(), Cell(), fitBlock(), GetArrStringWidth(), getCellBorder(), getCellCode(), getNumLines(), getPageWidth(), getRawCharWidth(), getStringHeight(), Image(), Link(), MultiCell(), setPageOrientation(), and Write().
|
protected |
Definition at line 1573 of file tcpdf.php.
Referenced by __construct().
|
protected |
Definition at line 241 of file tcpdf.php.
Referenced by setPageOrientation().
|
protected |
Definition at line 303 of file tcpdf.php.
Referenced by Annotation(), checkPageBreak(), fitBlock(), getCellBorder(), getCellCode(), getNumLines(), Image(), Link(), MultiCell(), Text(), and Write().
|
protected |
Definition at line 1544 of file tcpdf.php.
Referenced by AddFont(), Annotation(), Image(), and MultiCell().
|
protected |
Definition at line 309 of file tcpdf.php.
Referenced by AddSpotColor(), Annotation(), checkPageBreak(), fitBlock(), getCellBorder(), getCellCode(), Image(), Link(), MultiCell(), SetLink(), setTableHeader(), and Text().