Stream
in package
Pdf page text stream class
Tags
Table of Contents
Properties
- $currentX : int|float|null
- Current X
- $currentY : int|float|null
- Current Y
- $edgeX : int|null
- Edge X boundary
- $edgeY : int|float|null
- Edge Y boundary
- $orphanIndex : array<string|int, mixed>
- Orphan index
- $startX : int|float|null
- Start X
- $startY : int|float|null
- Start Y
- $streams : array<string|int, mixed>
- Text streams
- $styles : array<string|int, mixed>
- Text styles
Methods
- __construct() : mixed
- Constructor
- addText() : Stream
- Add text to the stream
- getColorStream() : string
- Get the partial color stream
- getCurrentX() : int|float|null
- Get current X
- getCurrentY() : int|float|null
- Get current Y
- getEdgeX() : int|float|null
- Get edge X boundary
- getEdgeY() : int|float|null
- Get edge Y boundary
- getOrphanStream() : Stream
- Resume stream from orphaned index
- getStartX() : int|float|null
- Get start X
- getStartY() : int|float|null
- Get start Y
- getStream() : string
- Get stream
- getTextStreams() : array<string|int, mixed>
- Get text stream
- hasOrphanIndex() : bool
- Check if the text stream has orphan streams due to the page bottom
- hasOrphans() : bool
- Prepare stream
- hasTextStreams() : bool
- Has text streams
- setCurrentStyle() : Stream
- Set the current style
- setCurrentX() : Stream
- Set current X
- setCurrentY() : Stream
- Set current Y
- setEdgeX() : Stream
- Set edge X boundary
- setEdgeY() : Stream
- Set edge Y boundary
- setStartX() : Stream
- Set start X
- setStartY() : Stream
- Set start Y
Properties
$currentX
Current X
protected
int|float|null
$currentX
= null
$currentY
Current Y
protected
int|float|null
$currentY
= null
$edgeX
Edge X boundary
protected
int|null
$edgeX
= null
$edgeY
Edge Y boundary
protected
int|float|null
$edgeY
= null
$orphanIndex
Orphan index
protected
array<string|int, mixed>
$orphanIndex
= []
$startX
Start X
protected
int|float|null
$startX
= null
$startY
Start Y
protected
int|float|null
$startY
= null
$streams
Text streams
protected
array<string|int, mixed>
$streams
= []
$styles
Text styles
protected
array<string|int, mixed>
$styles
= []
Methods
__construct()
Constructor
public
__construct(int $startX, int $startY, int $edgeX[, int|null $edgeY = null ]) : mixed
Instantiate a PDF text stream object.
Parameters
- $startX : int
- $startY : int
- $edgeX : int
- $edgeY : int|null = null
addText()
Add text to the stream
public
addText(string $string[, int|float|null $y = null ]) : Stream
Parameters
- $string : string
- $y : int|float|null = null
Return values
StreamgetColorStream()
Get the partial color stream
public
getColorStream(ColorInterface $color) : string
Parameters
- $color : ColorInterface
Return values
stringgetCurrentX()
Get current X
public
getCurrentX() : int|float|null
Return values
int|float|nullgetCurrentY()
Get current Y
public
getCurrentY() : int|float|null
Return values
int|float|nullgetEdgeX()
Get edge X boundary
public
getEdgeX() : int|float|null
Return values
int|float|nullgetEdgeY()
Get edge Y boundary
public
getEdgeY() : int|float|null
Return values
int|float|nullgetOrphanStream()
Resume stream from orphaned index
public
getOrphanStream() : Stream
Return values
StreamgetStartX()
Get start X
public
getStartX() : int|float|null
Return values
int|float|nullgetStartY()
Get start Y
public
getStartY() : int|float|null
Return values
int|float|nullgetStream()
Get stream
public
getStream(array<string|int, mixed> $fonts, array<string|int, mixed> $fontReferences) : string
Parameters
- $fonts : array<string|int, mixed>
- $fontReferences : array<string|int, mixed>
Return values
stringgetTextStreams()
Get text stream
public
getTextStreams() : array<string|int, mixed>
Return values
array<string|int, mixed>hasOrphanIndex()
Check if the text stream has orphan streams due to the page bottom
public
hasOrphanIndex() : bool
Return values
boolhasOrphans()
Prepare stream
public
hasOrphans(array<string|int, mixed> $fonts) : bool
Parameters
- $fonts : array<string|int, mixed>
Return values
boolhasTextStreams()
Has text streams
public
hasTextStreams() : bool
Return values
boolsetCurrentStyle()
Set the current style
public
setCurrentStyle(string $font, int $size[, ColorInterface|null $color = null ]) : Stream
Parameters
- $font : string
- $size : int
- $color : ColorInterface|null = null
Return values
StreamsetCurrentX()
Set current X
public
setCurrentX(int|float $currentX) : Stream
Parameters
- $currentX : int|float
Return values
StreamsetCurrentY()
Set current Y
public
setCurrentY(int|float $currentY) : Stream
Parameters
- $currentY : int|float
Return values
StreamsetEdgeX()
Set edge X boundary
public
setEdgeX(int|float $edgeX) : Stream
Parameters
- $edgeX : int|float
Return values
StreamsetEdgeY()
Set edge Y boundary
public
setEdgeY(int|float $edgeY) : Stream
Parameters
- $edgeY : int|float
Return values
StreamsetStartX()
Set start X
public
setStartX(int|float $startX) : Stream
Parameters
- $startX : int|float
Return values
StreamsetStartY()
Set start Y
public
setStartY(int|float $startY) : Stream
Parameters
- $startY : int|float