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
protected int PdfParser::$fileHeaderOffset
The offset to the file header.
$streamReader
protected StreamReader PdfParser::$streamReader
$tokenizer
protected Tokenizer PdfParser::$tokenizer
$xref
protected CrossReference\CrossReference|null PdfParser::$xref
Methods
__construct()
ensureExpectedType()
Ensures that the token will evaluate to an expected object type (or not).
Parameters
- $token : string
- $expectedType : string|null
Exceptions
Throws Type\PdfTypeException
getCatalog()
Get the catalog dictionary.
Exceptions
Throws Type\PdfTypeException
Throws CrossReference\CrossReferenceException
Throws PdfParserException
getCrossReference()
Get the cross-reference instance.
Exceptions
Throws CrossReference\CrossReferenceException
Throws PdfParserException
getIndirectObject()
public PdfParser::getIndirectObject (
int $objectNumber [, bool $cache = false ]
): Type\PdfIndirectObjectGet an indirect object by its object number.
Parameters
- $objectNumber : int
- $cache : bool
Exceptions
Throws CrossReference\CrossReferenceException
Throws PdfParserException
getPdfVersion()
Get the PDF version.
Return Values
An array of major and minor version.
Exceptions
Throws PdfParserException
parsePdfArray()
Exceptions
Throws Type\PdfTypeException
parsePdfDictionary()
Exceptions
Throws Type\PdfTypeException
parsePdfIndirectObject()
protected PdfParser::parsePdfIndirectObject (
int $objectNumber, int $generationNumber
): false|Type\PdfIndirectObjectParameters
- $objectNumber : int
- $generationNumber : int
Exceptions
Throws Type\PdfTypeException
readValue()
public PdfParser::readValue (
[ null|bool|string $token = null [, null|string $expectedType = null ]]
): false|Type\PdfArray|Type\PdfBoolean|Type\PdfDictionary|Type\PdfHexString|Type\PdfIndirectObject|Type\PdfIndirectObjectReference|Type\PdfName|Type\PdfNull|Type\PdfNumeric|Type\PdfStream|Type\PdfString|Type\PdfTokenRead a PDF value.
Parameters
- $token : null|bool|string
- $expectedType : null|string
Exceptions
Throws Type\PdfTypeException