setasign\Fpdi\PdfParser

PdfParser A PDF parser class

File: /FPDI v2/PdfParser/PdfParser.php

Class hierarchy

Summary

Properties

$fileHeader

protected string PdfParser::$fileHeader

The file header.

$fileHeaderOffset

The offset to the file header.

$objects

protected array PdfParser::$objects = array()

All read objects.

$streamReader

$tokenizer


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