FunctionType0
extends PdfStream
in package
Sampled function (FunctionType 0) — ISO 32000-2 §7.10.2.
Interpolates from a table of sample values. Must be a stream: the body holds BitsPerSample-wide binary samples packed big-endian. Required entries: Size, BitsPerSample, Domain, Range (plus Order, Encode, Decode).
Table of Contents
Properties
- $bitsPerSample : int
- $data : string
- $decode : PdfArray|null
- $dictionary : PdfDictionary
- $domain : PdfArray
- $encode : PdfArray|null
- $generationNumber : int
- $objectNumber : int
- $order : int|null
- $range : PdfArray
- $size : PdfArray
Methods
- __construct() : mixed
- getFunctionType() : int
- setFilter() : void
- Set a filter to encode/decode the stream data.
- toIndirectObject() : string
- Wrap the object in an indirect object structure: X Y obj ... endobj
- toPdf() : string
- Returns the stream body: dictionary, stream keyword, data, endstream.
Properties
$bitsPerSample
public
int
$bitsPerSample
$data
public
string
$data
= ''
$decode
public
PdfArray|null
$decode
= null
$dictionary
public
PdfDictionary
$dictionary
$domain
public
PdfArray
$domain
$encode
public
PdfArray|null
$encode
= null
$generationNumber
public
int
$generationNumber
= 0
$objectNumber
public
int
$objectNumber
= 0
$order
public
int|null
$order
= null
$range
public
PdfArray
$range
$size
public
PdfArray
$size
Methods
__construct()
public
__construct(PdfArray $domain, PdfArray $range, PdfArray $size, int $bitsPerSample[, string $samples = '' ]) : mixed
Parameters
getFunctionType()
public
getFunctionType() : int
Return values
intsetFilter()
Set a filter to encode/decode the stream data.
public
setFilter(FilterInterface $filter, string $pdfFilterName) : void
Parameters
- $filter : FilterInterface
-
The filter implementation
- $pdfFilterName : string
-
The PDF filter name (e.g. 'FlateDecode', 'ASCII85Decode')
toIndirectObject()
Wrap the object in an indirect object structure: X Y obj ... endobj
public
toIndirectObject() : string
Return values
stringtoPdf()
Returns the stream body: dictionary, stream keyword, data, endstream.
public
toPdf() : string
/Length is injected into the dictionary at serialization time. If a filter is set, the data is encoded before writing.