setasign\FpdiPdfParser\PdfParser

PdfParser A PDF parser class

File: /FPDI PDF-Parser v2/PdfParser/PdfParser.php

Class hierarchy

Summary

Constants

PARAM_IGNORE_PERMISSIONS

public const string PdfParser::PARAM_IGNORE_PERMISSIONS = 'ignorePermissions'

PARAM_OWNER_PASSWORD

public const string PdfParser::PARAM_OWNER_PASSWORD = 'ownerPassword'

PARAM_PASSWORD

public const string PdfParser::PARAM_PASSWORD = 'password'

PARAM_USER_PASSWORD

public const string PdfParser::PARAM_USER_PASSWORD = 'userPassword'

Properties

$currentIndirectObjectGenerationNumber

$currentIndirectObjectNumber

$fileHeader

The file header.

$fileHeaderOffset

The offset to the file header.

$objects

protected array \setasign\Fpdi\PdfParser\PdfParser::$objects = array()

All read objects.

$parserParams

protected array PdfParser::$parserParams = array()

Methods

__construct()

public PdfParser::__construct (
\setasign\Fpdi\PdfParser\StreamReader $streamReader,
array $parserParams = array ( )
)

PdfParser constructor.

Parameters
$streamReader: \setasign\Fpdi\PdfParser\StreamReader
 
$parserParams: array
 
Exceptions

Throws \setasign\Fpdi\FpdiException

decryptStream()

ensureExpectedType()

protected \setasign\Fpdi\PdfParser\PdfParser::ensureExpectedType (
string $token,
?string $expectedType
): bool

Ensures that the token will evaluate to an expected object type (or not).

Parameters
$token: string
 
$expectedType: ?string
 
Exceptions

Throws \setasign\Fpdi\PdfParser\Type\PdfTypeException

getIndirectObject()

Get an indirect object by its object number.

Parameters
$objectNumber: int
 
$cache: bool
 
Exceptions

Throws \setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException

Throws \setasign\Fpdi\PdfParser\PdfParserException

getPdfVersion()

Get the PDF version.

Return Values

An array of major and minor version.

Exceptions

Throws \setasign\Fpdi\PdfParser\PdfParserException

getStreamReader()

getTokenizer()

parsePdfHexString()

parsePdfIndirectObject()

resolveFileHeader()

Resolves the file header.

Exceptions

Throws \setasign\Fpdi\PdfParser\PdfParserException