FunctionType4
extends PdfStream
in package
PostScript calculator function (FunctionType 4) — ISO 32000-2 §7.10.5.
Evaluates a small subset of PostScript embedded in the stream body.
Required entries: Domain, Range. The stream body must begin with {
and end with }, e.g. { 1 exch sub }.
Attributes
- #[RequiresPdfVersion]
- \Phpdftk\Pdf\Core\PdfVersion::V1_3
Table of Contents
Properties
- $data : string
- $dictionary : PdfDictionary
- $domain : PdfArray
- $generationNumber : int
- $objectNumber : int
- $range : 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
$data
public
string
$data
= ''
$dictionary
public
PdfDictionary
$dictionary
$domain
public
PdfArray
$domain
$generationNumber
public
int
$generationNumber
= 0
$objectNumber
public
int
$objectNumber
= 0
$range
public
PdfArray
$range
Methods
__construct()
public
__construct(PdfArray $domain, PdfArray $range, string $postScript) : 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.