A PDF parser class.
More...
|
string | $fileHeader |
| The file header.
|
|
int | $fileHeaderOffset |
| The offset to the file header.
|
|
array | $objects = [] |
| All read objects.
|
|
StreamReader | $streamReader |
|
Tokenizer | $tokenizer |
|
CrossReference null | $xref |
|
◆ __construct()
◆ ensureExpectedType()
PdfParser::ensureExpectedType |
( |
| $token, |
|
|
| $expectedType ) |
|
protected |
Ensures that the token will evaluate to an expected object type (or not).
- Parameters
-
string | $token | |
string | null | $expectedType | |
- Return values
-
- Exceptions
-
◆ getCatalog()
PdfParser::getCatalog |
( |
| ) |
|
Get the catalog dictionary.
- Return values
-
- Exceptions
-
◆ getCrossReference()
PdfParser::getCrossReference |
( |
| ) |
|
Get the cross-reference instance.
- Return values
-
- Exceptions
-
◆ getIndirectObject()
PdfParser::getIndirectObject |
( |
| $objectNumber, |
|
|
| $cache = false ) |
Get an indirect object by its object number.
- Parameters
-
int | $objectNumber | |
bool | $cache | |
- Return values
-
- Exceptions
-
◆ getPdfVersion()
PdfParser::getPdfVersion |
( |
| ) |
|
Get the PDF version.
- Return values
-
int[] | An array of major and minor version. |
- Exceptions
-
◆ getStreamReader()
PdfParser::getStreamReader |
( |
| ) |
|
Get the stream reader instance.
- Return values
-
◆ getTokenizer()
PdfParser::getTokenizer |
( |
| ) |
|
Get the tokenizer instance.
- Return values
-
◆ parsePdfArray()
PdfParser::parsePdfArray |
( |
| ) |
|
|
protected |
◆ parsePdfDictionary()
PdfParser::parsePdfDictionary |
( |
| ) |
|
|
protected |
◆ parsePdfHexString()
PdfParser::parsePdfHexString |
( |
| ) |
|
|
protected |
◆ parsePdfIndirectObject()
PdfParser::parsePdfIndirectObject |
( |
| $objectNumber, |
|
|
| $generationNumber ) |
|
protected |
- Parameters
-
int | $objectNumber | |
int | $generationNumber | |
- Return values
-
- Exceptions
-
◆ parsePdfName()
PdfParser::parsePdfName |
( |
| ) |
|
|
protected |
◆ parsePdfString()
PdfParser::parsePdfString |
( |
| ) |
|
|
protected |
◆ readValue()
PdfParser::readValue |
( |
| $token = null, |
|
|
| $expectedType = null ) |
Read a PDF value.
- Parameters
-
null | bool | string | $token | |
null | string | $expectedType | |
- Return values
-
false|PdfArray|PdfBoolean|PdfDictionary|PdfHexString|PdfIndirectObject|PdfIndirectObjectReference|PdfName|PdfNull|PdfNumeric|PdfStream|PdfString|PdfToken | |
- Exceptions
-
◆ resolveFileHeader()
PdfParser::resolveFileHeader |
( |
| ) |
|
|
protected |
Resolves the file header.
- Exceptions
-
- Return values
-
The documentation for this class was generated from the following file:
- mod/assign/feedback/editpdf/fpdi/PdfParser/PdfParser.php