Alignment
extends AbstractAlignment
in package
Pdf page text alignment class
Tags
Table of Contents
Constants
Properties
- $alignment : string
- Text alignment
- $leading : int
- Text leading
- $leftX : int
- Left X boundary
- $rightX : int
- Right X boundary
Methods
- __construct() : mixed
- Constructor
- createCenter() : Alignment
- Create CENTER alignment object
- createLeft() : Alignment
- Create LEFT alignment object
- createRight() : Alignment
- Create RIGHT alignment object
- getAlignment() : string
- Get alignment
- getLeading() : int
- Get the leading
- getLeftX() : int
- Get the left X
- getRightX() : int
- Get the right X
- getStrings() : array<string|int, mixed>
- Get strings
- hasLeading() : bool
- Has leading
- hasLeftX() : bool
- Has left X
- hasRightX() : bool
- Has right X
- isCenter() : bool
- Is CENTER alignment
- isLeft() : bool
- Is LEFT alignment
- isRight() : bool
- Is RIGHT alignment
- setAlignment() : AbstractAlignment
- Set alignment
- setLeading() : AbstractAlignment
- Set the leading
- setLeftX() : AbstractAlignment
- Set the left X boundary
- setRightX() : AbstractAlignment
- Set the right X boundary
Constants
CENTER
Alignment constants
public
mixed
CENTER
= 'CENTER'
LEFT
Alignment constants
public
mixed
LEFT
= 'LEFT'
RIGHT
public
mixed
RIGHT
= 'RIGHT'
Properties
$alignment
Text alignment
protected
string
$alignment
= self::LEFT
$leading
Text leading
protected
int
$leading
= 0
$leftX
Left X boundary
protected
int
$leftX
= 0
$rightX
Right X boundary
protected
int
$rightX
= 0
Methods
__construct()
Constructor
public
__construct([string $alignment = self::LEFT ][, int $leftX = 0 ][, int $rightX = 0 ][, int $leading = 0 ]) : mixed
Instantiate a PDF text alignment object.
Parameters
- $alignment : string = self::LEFT
- $leftX : int = 0
- $rightX : int = 0
- $leading : int = 0
createCenter()
Create CENTER alignment object
public
static createCenter([int $leftX = 0 ][, int $rightX = 0 ][, int $leading = 0 ]) : Alignment
Parameters
- $leftX : int = 0
- $rightX : int = 0
- $leading : int = 0
Return values
AlignmentcreateLeft()
Create LEFT alignment object
public
static createLeft([int $leftX = 0 ][, int $rightX = 0 ][, int $leading = 0 ]) : Alignment
Parameters
- $leftX : int = 0
- $rightX : int = 0
- $leading : int = 0
Return values
AlignmentcreateRight()
Create RIGHT alignment object
public
static createRight([int $leftX = 0 ][, int $rightX = 0 ][, int $leading = 0 ]) : Alignment
Parameters
- $leftX : int = 0
- $rightX : int = 0
- $leading : int = 0
Return values
AlignmentgetAlignment()
Get alignment
public
getAlignment() : string
Return values
stringgetLeading()
Get the leading
public
getLeading() : int
Return values
intgetLeftX()
Get the left X
public
getLeftX() : int
Return values
intgetRightX()
Get the right X
public
getRightX() : int
Return values
intgetStrings()
Get strings
public
getStrings(Text $text, Font $font, int $startY) : array<string|int, mixed>
Parameters
Tags
Return values
array<string|int, mixed>hasLeading()
Has leading
public
hasLeading() : bool
Return values
boolhasLeftX()
Has left X
public
hasLeftX() : bool
Return values
boolhasRightX()
Has right X
public
hasRightX() : bool
Return values
boolisCenter()
Is CENTER alignment
public
isCenter() : bool
Return values
boolisLeft()
Is LEFT alignment
public
isLeft() : bool
Return values
boolisRight()
Is RIGHT alignment
public
isRight() : bool
Return values
boolsetAlignment()
Set alignment
public
setAlignment(string $alignment) : AbstractAlignment
Parameters
- $alignment : string
Return values
AbstractAlignmentsetLeading()
Set the leading
public
setLeading(int $leading) : AbstractAlignment
Parameters
- $leading : int
Return values
AbstractAlignmentsetLeftX()
Set the left X boundary
public
setLeftX(int $x) : AbstractAlignment
Parameters
- $x : int
Return values
AbstractAlignmentsetRightX()
Set the right X boundary
public
setRightX(int $x) : AbstractAlignment
Parameters
- $x : int