setasign\FpdiPdfParser\PdfParser

PdfParser A PDF parser class

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

Class hierarchy

Summary

Properties

$fileHeader

protected string setasign\FpdiPdfParser\PdfParser\PdfParser::$fileHeader

The file header.

$fileHeaderOffset

protected int setasign\FpdiPdfParser\PdfParser\PdfParser::$fileHeaderOffset

The offset to the file header.

$objects

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

All read objects.

$streamReader

protected \setasign\Fpdi\PdfParser\StreamReader setasign\FpdiPdfParser\PdfParser\PdfParser::$streamReader

$tokenizer

protected \setasign\Fpdi\PdfParser\Tokenizer setasign\FpdiPdfParser\PdfParser\PdfParser::$tokenizer

$xref

protected \setasign\Fpdi\PdfParser\CrossReference\CrossReference setasign\FpdiPdfParser\PdfParser\PdfParser::$xref


Methods

__construct()

public \setasign\Fpdi\PdfParser\PdfParser::__construct (
\setasign\Fpdi\PdfParser\StreamReader $streamReader
)

PdfParser constructor.

Parameters
$streamReader : \setasign\Fpdi\PdfParser\StreamReader
 

getCatalog()

public \setasign\Fpdi\PdfParser\PdfParser::getCatalog (
void
): \setasign\Fpdi\PdfParser\Type\PdfDictionary

Get the catalog dictionary.

getCrossReference()

Get the cross reference instance.

getIndirectObject()

public \setasign\Fpdi\PdfParser\PdfParser::getIndirectObject (
int $objectNumber [, bool $cache = false ]
): \setasign\Fpdi\PdfParser\Type\PdfIndirectObject

Get an indirect object by its object number.

Parameters
$objectNumber : int
 
$cache : bool
 

getPdfVersion()

public \setasign\Fpdi\PdfParser\PdfParser::getPdfVersion (
void
): int[]

Get the PDF version.

Return Values

An array of major and minor version.

Exceptions

Throws \setasign\Fpdi\PdfParser\PdfParserException

getStreamReader()

public \setasign\Fpdi\PdfParser\PdfParser::getStreamReader (
void
): \setasign\Fpdi\PdfParser\StreamReader

Get the stream reader instance.

getTokenizer()

public \setasign\Fpdi\PdfParser\PdfParser::getTokenizer (
void
): \setasign\Fpdi\PdfParser\Tokenizer

Get the tokenizer instance.

readValue()

public \setasign\Fpdi\PdfParser\PdfParser::readValue (
[ null|bool|string $token = null ]
): bool|\setasign\Fpdi\PdfParser\Type\PdfArray|\setasign\Fpdi\PdfParser\Type\PdfBoolean|\setasign\Fpdi\PdfParser\Type\PdfHexString|\setasign\Fpdi\PdfParser\Type\PdfName|\setasign\Fpdi\PdfParser\Type\PdfNull|\setasign\Fpdi\PdfParser\Type\PdfNumeric|\setasign\Fpdi\PdfParser\Type\PdfString|\setasign\Fpdi\PdfParser\Type\PdfToken|\setasign\Fpdi\PdfParser\Type\PdfIndirectObjectReference

Read a PDF value.

Parameters
$token : null|bool|string
 

resolveFileHeader()

protected \setasign\Fpdi\PdfParser\PdfParser::resolveFileHeader (
void
): void

Resolves the file header.

Exceptions

Throws \setasign\Fpdi\PdfParser\PdfParserException