setasign\Fpdi\PdfParser

PdfParser A PDF parser class

File: /FPDI v2/PdfParser/PdfParser.php

Class hierarchy

Summary

Properties

$fileHeader

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

The file header.

$fileHeaderOffset

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

The offset to the file header.

$objects

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

All read objects.

$streamReader

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

$tokenizer

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

$xref

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


Methods

__construct()

public PdfParser::__construct (
StreamReader $streamReader
)

PdfParser constructor.

Parameters
$streamReader : StreamReader
 

getCatalog()

Get the catalog dictionary.

getCrossReference()

Get the cross reference instance.

getIndirectObject()

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

Get an indirect object by its object number.

Parameters
$objectNumber : int
 
$cache : bool
 

getPdfVersion()

public PdfParser::getPdfVersion (
void
): int[]

Get the PDF version.

Return Values

An array of major and minor version.

Exceptions

Throws PdfParserException

getStreamReader()

Get the stream reader instance.

getTokenizer()

public PdfParser::getTokenizer (
void
): Tokenizer

Get the tokenizer instance.

readValue()

Read a PDF value.

Parameters
$token : null|bool|string
 

resolveFileHeader()

protected PdfParser::resolveFileHeader (
void
): void

Resolves the file header.

Exceptions

Throws PdfParserException