Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
PdfStream Class Reference

Class representing a PDF stream object. More...

Inheritance diagram for PdfStream:

Public Member Functions

 getFilters ()
 Get all filters defined for this stream.
 
 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

◆ getFilters()

PdfStream::getFilters ( )

Get all filters defined for this stream.

Return values
PdfType[]
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: