pdf_context Class pdf_context

File: /FPDI v1/pdf_context.php

Class hierarchy

Summary

Properties

$_mode

protected integer pdf_context::$_mode = 0

Mode

0 = file | 1 = string

$buffer

public string pdf_context::$buffer

$file

public resource|string pdf_context::$file

$length

public integer pdf_context::$length

$offset

public integer pdf_context::$offset

$stack

public array pdf_context::$stack

Methods

__construct()

public pdf_context::__construct (
resource &$f
)

The constructor

Parameters
$f : resource
 

ensureContent()

public pdf_context::ensureContent (
void
): bool

Make sure that there is at least one character beyond the current offset in the buffer.

To prevent the tokenizer from attempting to access data that does not exist.

getPos()

public pdf_context::getPos (
void
): int

Get the position in the file stream

increaseLength()

public pdf_context::increaseLength (
[ int $l = 100 ]
): bool

Forcefully read more data into the buffer

Parameters
$l : int
 

reset()

public pdf_context::reset (
[ null $pos = null [, int $l = 100 ]]
): void

Reset the position in the file stream.

Optionally move the file pointer to a new location and reset the buffered data.

Parameters
$pos : null
 
$l : int