Documentation

Alignment extends AbstractAlignment
in package

Pdf page text alignment class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
5.2.0

Table of Contents

Constants

CENTER  = 'CENTER'
Alignment constants
LEFT  = 'LEFT'
Alignment constants
RIGHT  = 'RIGHT'

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'

Properties

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
Alignment

createLeft()

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
Alignment

createRight()

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
Alignment

getAlignment()

Get alignment

public getAlignment() : string
Return values
string

getStrings()

Get strings

public getStrings(Text $text, Font $font, int $startY) : array<string|int, mixed>
Parameters
$text : Text
$font : Font
$startY : int
Tags
throws
Exception
Return values
array<string|int, mixed>

isCenter()

Is CENTER alignment

public isCenter() : bool
Return values
bool

        
On this page

Search results