Table of contents
Namespace: Com\Tecnick\Pdf
Extends: Base
Abstract: Yes
File: Cell.php line 39
Cell PDF data
Tags
- since: 2002-08-03
- category: Library
- author: Nicola Asuni info@tecnick.com
- copyright: 2002-2026 Nicola Asuni - Tecnick.com LTD
- license: https://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE)
- link: https://github.com/tecnickcom/tc-lib-pdf
- phpstan-import-type: StyleDataOpt from \Com\Tecnick\Pdf\Graph\Base
- phpstan-import-type: TCellDef from \Com\Tecnick\Pdf\Base
- SuppressWarnings: (“PHPMD.DepthOfInheritance”)
Constants
BORDERPOS_DEFAULT
File: Base.php line 1405
public mixed BORDERPOS_DEFAULT = 0.0
BORDERPOS_EXTERNAL
File: Base.php line 1411
public mixed BORDERPOS_EXTERNAL = -0.5
BORDERPOS_INTERNAL
File: Base.php line 1417
public mixed BORDERPOS_INTERNAL = 0.5
ZEROCELL
File: Base.php line 1436
public TCellDef ZEROCELL = ['margin' => self::ZEROCELLBOUND, 'padding' => self::ZEROCELLBOUND, 'borderpos' => self::BORDERPOS_DEFAULT]
ZEROCELLBOUND
File: Base.php line 1424
public TCellBound ZEROCELLBOUND = ['T' => 0.0, 'R' => 0.0, 'B' => 0.0, 'L' => 0.0]
Properties
$barcode
File: Base.php line 732
public Barcode $barcode
$cache
File: Base.php line 747
public Cache $cache
$color
File: Base.php line 727
public PdfColor $color
$encrypt
File: Base.php line 722
public Encrypt $encrypt
$file
File: Base.php line 737
public File $file
$font
File: Base.php line 773
public Stack $font
$graph
File: Base.php line 768
public Draw $graph
$image
File: Base.php line 778
public Import $image
$markupFile
File: Base.php line 742
public File $markupFile
$page
File: Base.php line 763
public Page $page
$pon
File: Base.php line 1148
public int $pon = 0
$uniconv
File: Base.php line 758
public Convert $uniconv
Methods
defaultFileAllowedPaths()
File: Base.php line 1645
public defaultFileAllowedPaths() : array<string|int, string>
Return values
array<string|int, string>
defaultMarkupAllowedPaths()
File: Base.php line 1655
public defaultMarkupAllowedPaths() : array<string|int, string>
Return values
array<string|int, string>
enableDefaultPageContent()
File: Base.php line 1514
public enableDefaultPageContent([bool $enable = true ]) : void
Parameters
- $enable : bool = true: Enable or disable the default page content.
getWarnings()
File: Base.php line 1860
public getWarnings() : array<int, string>
The list is filled while the content is written and while the document is serialized, so it is complete only after getOutPDFString() has been called.
Return values
array<int, string>
initClassObjects()
File: Base.php line 2065
public initClassObjects([Encrypt|null $objEncrypt = null ][, TFileOptions|null $fileOptions = null ][, CacheInterface|null $cache = null ]) : void
Parameters
- $objEncrypt : Encrypt|null = null: Encryption object.
- $fileOptions : TFileOptions|null = null: Optional configuration for the shared file helper used to load external resources (images, fonts, SVG, etc.). Supported keys: - allowedHosts (string[]): Whitelist of host names that the library is allowed to fetch over HTTP/HTTPS. For security reasons remote URL loading is DISABLED by default; you MUST populate this list (for example [’example.com’, ‘cdn.example.com’]) to enable any remote download. Local file reads are controlled separately by allowedPaths. - maxRemoteSize (int): Maximum size in bytes accepted for a remote download (default 52428800 = 50 MiB). - curlopts (array<int,bool|int|string>): Per-request cURL options merged on top of the defaults (keys are CURLOPT_* constants). - defaultCurlOpts (array<int,bool|int|string>): Replaces the built-in default cURL options. Use with care; omit to keep the safe defaults. - fixedCurlOpts (array<int,bool|int|string>): cURL options that are always enforced and cannot be overridden by curlopts (for example to pin TLS settings). - allowedPaths (string[]): Trusted local path prefixes for file:// reads. Defaults are automatically computed from the package location to cover bundled example assets. - markupAllowedPaths (string[]): Trusted local path prefixes for resources referenced by rendered HTML/CSS/SVG markup. Defaults exclude the system temp directory; when omitted, explicit allowedPaths values are reused for markup too.
- $cache : CacheInterface|null = null: Optional external cache shared by the cacheable sub-libraries (font subsets, images, …). The application owns the backend, its (de)serialization, expiration and size limits. Null (default) disables external caching.
Tags
- throws: Exception
- throws: Exception
- throws: Exception
- throws: Exception
- throws: Exception
- throws: Exception
setDefaultCellBorderPos()
File: Cell.php line 131
public setDefaultCellBorderPos(float $borderpos) : void
Parameters
- $borderpos : float: The border position to set: BORDERPOS_DEFAULT BORDERPOS_EXTERNAL BORDERPOS_INTERNAL
setDefaultCellMargin()
File: Cell.php line 96
public setDefaultCellMargin(float $top, float $right, float $bottom, float $left) : void
The values are converted and stored in internal points, so the margin of a cell definition array passed to the text methods must be already in points.
Parameters
- $top : float: Top.
- $right : float: Right.
- $bottom : float: Bottom.
- $left : float: Left.
setDefaultCellPadding()
File: Cell.php line 115
public setDefaultCellPadding(float $top, float $right, float $bottom, float $left) : void
The values are converted and stored in internal points, so the padding of a cell definition array passed to the text methods must be already in points.
Parameters
- $top : float: Top.
- $right : float: Right.
- $bottom : float: Bottom.
- $left : float: Left.
setPDFVersion()
File: Base.php line 1969
public setPDFVersion([string $version = '1.7' ]) : static
Parameters
- $version : string = ‘1.7’: PDF document version.
Tags
- throws: Exception in case of error.
Return values
static
setRTL()
File: Base.php line 1624
public setRTL(bool $enabled) : static
Parameters
- $enabled : bool: False = LTR = Left-To-Right; True = RTL = Right-To-Left.
Return values
static
toPoints()
File: Base.php line 1454
public toPoints(float $usr) : float
Parameters
- $usr : float: Value to convert.
Return values
float
toUnit()
File: Base.php line 1464
public toUnit(float $pnt) : float
Parameters
- $pnt : float: Value to convert in user units.
Return values
float
toYPoints()
File: Base.php line 1478
public toYPoints(float $usr[, float $pageh = -1 ]) : float
Note: the internal Y points coordinate starts at the bottom left of the page.
Parameters
- $usr : float: Value to convert.
- $pageh : float = -1: Optional page height in internal points ($pageh:$this->page->getPage()[‘pheight’]).
Tags
- throws: Exception
Return values
float
toYUnit()
File: Base.php line 1497
public toYUnit(float $pnt[, float $pageh = -1 ]) : float
Note: the internal Y points coordinate starts at the bottom left of the page.
Parameters
- $pnt : float: Value to convert.
- $pageh : float = -1: Optional page height in internal points ($pageh:$this->page->getPage()[‘pheight’]).
Tags
- throws: Exception
Return values
float