class | TCPDF_STATIC Static methods used by the TCPDF class. |
---|---|
package | com.tecnick.tcpdf |
brief | PHP class for generating PDF documents without requiring external extensions. |
version | 1.1.1 |
author | Nicola Asuni - info@tecnick.com |
_AES(string $key,string $text): string
This method requires openssl or mcrypt. Text is padded to 16bytes blocks
author | Nicola Asuni |
---|---|
since | 5.0.005 (2010-05-11) |
public | static |
string
encryption key
string
input text to be encrypted
string
encrypted text
_AESnopad(string $key,string $text): string
This method requires openssl or mcrypt. Text is not padded
author | Nicola Asuni |
---|---|
since | TODO |
public | static |
string
encryption key
string
input text to be encrypted
string
encrypted text
_escape(string $s): string
public | static |
---|
string
string to escape.
string
escaped string.
_escapeXML(string $str): string
since | 5.9.121 (2011-09-28) |
---|---|
public | static |
string
Input string to convert.
string
converted string
_freadint(resource $f): integer
public | static |
---|
resource
file resource.
integer
4-byte integer
_getBYTE(string $str,integer $offset): integer
author | Nicola Asuni |
---|---|
since | 5.2.000 (2010-06-02) |
public | static |
string
String from where to extract value.
integer
Point from where to read the data.
integer
8 bit value
_getFIXED(string $str,integer $offset): integer
author | Nicola Asuni |
---|---|
since | 5.9.123 (2011-09-30) |
public | static |
string
string from where to extract value
integer
point from where to read the data
integer
16 bit value
_getFWORD(string $str,integer $offset): integer
author | Nicola Asuni |
---|---|
since | 5.9.123 (2011-09-30) |
public | static |
string
String from where to extract value.
integer
Point from where to read the data.
integer
16 bit value
_getSHORT(string $str,integer $offset): integer
author | Nicola Asuni |
---|---|
since | 5.2.000 (2010-06-02) |
public | static |
string
String from where to extract value.
integer
Point from where to read the data.
integer
16 bit value
_getUFWORD(string $str,integer $offset): integer
author | Nicola Asuni |
---|---|
since | 5.9.123 (2011-09-30) |
public | static |
string
string from where to extract value
integer
point from where to read the data
integer
16 bit value
_getULONG(string $str,integer $offset): integer
author | Nicola Asuni |
---|---|
since | 5.2.000 (2010-06-02) |
public | static |
string
string from where to extract value
integer
point from where to read the data
integer
32 bit value
_getUSHORT(string $str,integer $offset): integer
author | Nicola Asuni |
---|---|
since | 5.2.000 (2010-06-02) |
public | static |
string
string from where to extract value
integer
point from where to read the data
integer
16 bit value
_md5_16(string $str): string
since | 2.0.000 (2008-01-02) |
---|---|
public | static |
string
input string
string
MD5 encrypted binary string
_RC4(string $key,string $text,string &$last_enc_key,string &$last_enc_key_c): string
RC4 is the standard encryption algorithm used in PDF format
since | 2.0.000 (2008-01-02) |
---|---|
author | Klemen Vodopivec, Nicola Asuni |
public | static |
string
Encryption key.
string
Input text to be encrypted.
string
Reference to last RC4 key encrypted.
string
Reference to last RC4 computed key.
string
encrypted text
convertHexStringToString(string $bs): string
since | 5.0.005 (2010-05-12) |
---|---|
author | Nicola Asuni |
public | static |
string
byte-string to convert
string
convertStringToHexString(string $s): string
since | 5.0.010 (2010-05-17) |
---|---|
author | Nicola Asuni |
public | static |
string
string to convert
string
byte string
empty_string(string $str): boolean
since | 4.5.044 (2009-04-16) |
---|---|
public | static |
string
string to be checked
boolean
true if string is empty
encodeNameObject(string $name): string
author | Nicola Asuni |
---|---|
since | 5.9.097 (2011-06-23) |
public | static |
string
Name object to encode.
string
Encoded name object.
encodeUrlQuery(string $url): string
since | 6.3.3 (2019-11-01) |
---|---|
public | static |
string
string
extractCSSproperties(string $cssdata): array
author | Nicola Asuni |
---|---|
since | 5.1.000 (2010-05-25) |
public | static |
string
string containing CSS definitions.
array
An array where the keys are the CSS selectors and the values are the CSS properties.
file_exists(string $filename): boolean
Checks whether a file or directory exists. Only allows some protocols and local files.
public | static |
---|
string
Path to the file or directory.
boolean
Returns TRUE if the file or directory specified by filename exists; FALSE otherwise.
fileGetContents(string $file): string|false
The file can be also an URL.
author | Nicola Asuni |
---|---|
since | 6.0.025 |
public | static |
string
Name of the file or URL to read.
string|false
The function returns the read data or FALSE on failure.
fixHTMLCode(string $html,string $default_css,array|null $tagvs,array|null $tidy_options,array &$tagvspaces): string
author | Nicola Asuni |
---|---|
since | 5.9.017 (2010-11-16) |
see | \setHtmlVSpace() |
public | static |
string
htmlcode to fix
string
CSS commands to add
array|null
parameters for setHtmlVSpace method
array|null
options for tidy_parse_string function
array
Array of vertical spaces for tags.
string
XHTML code cleaned up
fopenLocal(string $filename,string $mode): resource|false
public | static |
---|
string
Name of the file to open
string
resource|false
Returns a file pointer resource on success, or FALSE on error.
formatPageNumber(integer $num): string
This method can be overridden for custom formats.
since | 4.2.005 (2008-11-06) |
---|---|
public | static |
integer
page number
string
formatTOCPageNumber(integer $num): string
This method can be overridden for custom formats.
since | 4.5.001 (2009-01-04) |
---|---|
see | \addTOC(), addHTMLTOC() |
public | static |
integer
page number
string
get_mqr(): integer
since | 4.6.025 (2009-08-17) |
---|---|
public | static |
integer
Returns 0 if magic quotes runtime is off or get_magic_quotes_runtime doesn't exist, 1 otherwise.
getAnnotOptFromJSProp(array $prop,array &$spot_colors,boolean $rtl = false): array
author | Nicola Asuni |
---|---|
since | 4.8.000 (2009-09-06) |
public | static |
array
javascript field properties. Possible values are described on official Javascript for Acrobat API reference.
array
Reference to spot colors array.
boolean
True if in Right-To-Left text direction mode, false otherwise.
array
of annotation properties
getBorderMode(string|array|integer $brd,string $position = 'start',boolean $opencell = true): array
since | 4.4.002 (2008-12-09) |
---|---|
public | static |
string|array|integer
Indicates if borders must be drawn around the cell block. The value can be a number:
string
multicell position: 'start', 'middle', 'end'
boolean
True when the cell is left open at the page bottom, false otherwise.
array
border mode array
getCSSdataArray(array $dom,integer $key,array $css): array
since | 5.1.000 (2010-05-25) |
---|---|
public | static |
array
array of HTML tags and properties
integer
key of the current HTML tag
array
array of CSS properties
array
containing CSS properties
getEncPermissionsString(string $protection): string
since | 5.0.005 (2010-05-12) |
---|---|
author | Nicola Asuni |
public | static |
string
32bit encryption permission value (P value)
string
getFormattedDate(integer $time): string
since | 5.9.152 (2012-03-23) |
---|---|
public | static |
integer
Time in seconds.
string
escaped date string.
getHyphenPatternsFromTEX(string $file): array
author | Nicola Asuni |
---|---|
since | 4.9.012 (2010-04-12) |
public | static |
string
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
of hyphenation patterns
getObjFilename(string $type = 'tmp',string $file_id = ''): string
since | 4.5.000 (2008-12-31) |
---|---|
public | static |
string
Type of file (name of the subdir on the tcpdf cache folder).
string
TCPDF file_id.
string
filename.
getPageLayoutMode(string $layout = 'SinglePage'): string
public | static |
---|
string
The page layout. Possible values are:
string
Canonical page layout name.
getPageMode(string $mode = 'UseNone'): string
public | static |
---|
string
A name object specifying how the document should be displayed when opened:
string
Canonical page mode name.
getPageSizeFromFormat(mixed $format): array
since | 5.0.010 (2010-05-17) |
---|---|
public | static |
mixed
The format name @see self::$page_format
array
containing page width and height in points
getPathPaintOperator(string $style,string $default = 'S'): string
author | Nicola Asuni |
---|---|
since | 5.0.000 (2010-04-30) |
public | static |
string
Style of rendering. Possible values are:
string
default style
string
getRandomSeed(string $seed = ''): string
author | Nicola Asuni |
---|---|
since | 5.9.006 (2010-10-19) |
public | static |
string
starting seed value
string
containing random data
getSVGTransformMatrix(string $attribute): array
author | Nicola Asuni |
---|---|
since | 5.0.000 (2010-05-02) |
public | static |
string
transformation
array
of transformations
getTagStyleFromCSSarray(array $css): string
since | 5.9.070 (2011-04-19) |
---|---|
public | static |
array
array of CSS properties
string
containing merged CSS properties
getTCPDFProducer(): string
since | 6.0.000 (2013-03-16) |
---|---|
public | static |
string
TCPDF producer string
getTCPDFVersion(): string
since | 5.9.012 (2010-11-10) |
---|---|
public | static |
string
TCPDF version string
getTimestamp(string $date): integer
since | 5.9.152 (2012-03-23) |
---|---|
public | static |
string
Formatted date-time.
integer
seconds.
getTransformationMatrixProduct(array $ta,array $tb): array
author | Nicola Asuni |
---|---|
since | 5.0.000 (2010-05-02) |
public | static |
array
first SVG tranformation matrix
array
second SVG tranformation matrix
array
transformation array
getUserPermissionCode(array $permissions,integer $mode)
since | 5.0.005 (2010-05-12) |
---|---|
author | Nicola Asuni |
public | static |
array
the set of permissions (specify the ones you want to block).
integer
encryption strength: 0 = RC4 40 bit; 1 = RC4 128 bit; 2 = AES 128 bit; 3 = AES 256 bit.
getVectorsAngle(integer $x1,integer $y1,integer $x2,integer $y2)
author | Nicola Asuni |
---|---|
since | 5.0.000 (2010-05-04) |
public | static |
integer
X coordinate of first vector point
integer
Y coordinate of first vector point
integer
X coordinate of second vector point
integer
Y coordinate of second vector point
intToRoman(integer $number): string
since | 4.4.004 (2008-12-10) |
---|---|
public | static |
integer
number to convert
string
roman representation of the specified number
isValidCSSSelectorForTag(array $dom,integer $key,string $selector): true
since | 5.1.000 (2010-05-25) |
---|---|
public | static |
array
array of HTML tags and properties
integer
key of the current HTML tag
string
CSS selector string
true
if the selector is valid, false otherwise
isValidURL(string $url): boolean
since | 5.9.204 (2013-01-28) |
---|---|
public | static |
string
URL to check.
boolean
true if the URl exist, false otherwise.
objclone(object $object): object
since | 4.5.029 (2009-03-19) |
---|---|
public | static |
object
class object to be cloned
object
cloned object
pregSplit(string $pattern,string $modifiers,string $subject,integer $limit = NULL,integer $flags = NULL): array
This is a wrapper for the preg_split function to avoid the bug: https://bugs.php.net/bug.php?id=45850
author | Nicola Asuni |
---|---|
since | 6.0.023 |
public | static |
string
The regular expression pattern to search for without the modifiers, as a string.
string
The modifiers part of the pattern,
string
The input string.
integer
If specified, then only substrings up to limit are returned with the rest of the string being placed in the last substring. A limit of -1, 0 or NULL means "no limit" and, as is standard across PHP, you can use NULL to skip to the flags parameter.
integer
The flags as specified on the preg_split PHP function.
array
Returns an array containing substrings of subject split along boundaries matched by pattern.modifier
removeSHY(string $txt = '',boolean $unicode = true): string
Unicode Data:
since | (4.5.019) 2009-02-28 |
---|---|
public | static |
string
input string
boolean
True if we are in unicode mode, false otherwise.
string
without SHY characters.
replacePageNumAliases(string $page,array $replace,integer $diff): array
public | static |
---|
string
Page content.
array
Array of replacements (array keys are replacement strings, values are alias arrays).
integer
If passed, this will be set to the total char number difference between alias and replacements.
array
replaced page content and updated $diff parameter as array.
revstrpos(string $haystack,string $needle,integer $offset): integer|false
since | 4.8.038 (2010-03-13) |
---|---|
public | static |
string
The string to search in.
string
substring to search.
integer
May be specified to begin searching an arbitrary number of characters into the string.
integer|false
Returns the position where the needle exists. Returns FALSE if the needle was not found.
rfread(resource $handle,integer $length): string|false
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.
author | Nicola Asuni |
---|---|
since | 4.5.027 (2009-03-16) |
public | static |
resource
integer
string|false
Returns the read string or FALSE in case of error.
sendOutputData(string $data,integer $length)
since | 5.9.086 |
---|---|
public | static |
string
Data to output.
integer
Data length in bytes.
set_mqr(boolean $mqr)
since | 4.6.025 (2009-08-17) |
---|---|
public | static |
boolean
FALSE for off, TRUE for on.
setPageBoxes(integer $page,string $type,float $llx,float $lly,float $urx,float $ury,boolean $points,float $k,array $pagedim = array()): array
since | 5.0.010 (2010-05-17) |
---|---|
public | static |
integer
page number
string
valid values are:
float
lower-left x coordinate in user units.
float
lower-left y coordinate in user units.
float
upper-right x coordinate in user units.
float
upper-right y coordinate in user units.
boolean
If true uses user units as unit of measure, otherwise uses PDF points.
float
Scale factor (number of points in user unit).
array
Array of page dimensions.
array
pagedim array of page dimensions.
swapPageBoxCoordinates(integer $page,array $pagedim): array
since | 5.0.010 (2010-05-17) |
---|---|
public | static |
integer
page number
array
Array of page dimensions.
array
pagedim array of page dimensions.
url_exists(string $url): boolean
public | static |
---|---|
since | 6.2.25 |
string
URL to check.
boolean
Returns TRUE if the URL exists; FALSE otherwise.
tcpdf_version :
private | static |
---|---|
alias_tot_pages :
public | static |
---|---|
alias_num_page :
public | static |
---|---|
alias_group_tot_pages :
public | static |
---|---|
alias_group_num_page :
public | static |
---|---|
alias_right_shift :
public | static |
---|---|
enc_padding :
public | static |
---|---|
byterange_string :
since | (2009-08-25) |
---|---|
public | static |
pageboxes :
public | static |
---|---|
page_formats :\array<string,float[]>
public | static |
---|---|
var |
\array