Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
PdfStream Class Reference

Class representing a PDF stream object. More...

Inheritance diagram for PdfStream:

Public Member Functions

 getStream ($cache=false)
 Get the stream data.
 
 getUnfilteredStream ()
 Get the unfiltered stream data.
 

Static Public Member Functions

static create (PdfDictionary $dictionary, $stream)
 Helper method to create an instance.
 
static ensure ($stream)
 Ensures that the passed value is a PdfStream instance.
 
static parse (PdfDictionary $dictionary, StreamReader $reader, PdfParser $parser=null)
 Parses a stream from a stream reader.
 

Protected Member Functions

 extractStream ()
 Extract the stream "manually".
 

Protected Attributes

PdfParser $parser
 The PDF parser instance.
 
StreamReader null $reader
 The stream reader instance.
 
int string $stream
 The stream or its byte-offset position.
 

Detailed Description

Class representing a PDF stream object.

Member Function Documentation

◆ create()

static PdfStream::create ( PdfDictionary $dictionary,
$stream )
static

Helper method to create an instance.

Parameters
PdfDictionary$dictionary
string$stream
Return values
self

◆ ensure()

static PdfStream::ensure ( $stream)
static

Ensures that the passed value is a PdfStream instance.

Parameters
mixed$stream
Return values
self
Exceptions
PdfTypeException

◆ extractStream()

PdfStream::extractStream ( )
protected

Extract the stream "manually".

Return values
string
Exceptions
PdfTypeException

◆ getStream()

PdfStream::getStream ( $cache = false)

Get the stream data.

Parameters
bool$cacheWhether cache the stream data or not.
Return values
bool|string
Exceptions
PdfTypeException
CrossReferenceException
PdfParserException

◆ getUnfilteredStream()

PdfStream::getUnfilteredStream ( )

Get the unfiltered stream data.

Return values
string
Exceptions
FilterException
PdfParserException

◆ parse()

static PdfStream::parse ( PdfDictionary $dictionary,
StreamReader $reader,
PdfParser $parser = null )
static

Parses a stream from a stream reader.

Parameters
PdfDictionary$dictionary
StreamReader$reader
PdfParser$parserOptional to keep backwards compatibility
Return values
self
Exceptions
PdfTypeException

The documentation for this class was generated from the following file: