phpdftk API Documentation

ImageXObject extends PdfStream
in package

Image XObject (/Subtype /Image) — ISO 32000-2 §8.9.5, Table 89.

Table of Contents

Constants

PDF_SUBTYPE  = 'Image'
PDF_TYPE  = 'XObject'

Properties

$af  : PdfArray|null
$alternates  : PdfArray|null
$bitsPerComponent  : int
$colorSpace  : mixed
$data  : string
$decode  : PdfArray|null
$decodeParams  : PdfDictionary|PdfArray|null
/DecodeParms may be a single dict or an array of dicts (one per filter).
$dictionary  : PdfDictionary
$filter  : PdfName|PdfArray|null
/Filter may be a single name or an array of names for filter chains.
$generationNumber  : int
$height  : int
$id  : PdfString|null
$imageMask  : bool|null
$intent  : PdfName|null
$interpolate  : bool|null
$mask  : PdfReference|null
$matte  : PdfArray|null
$measure  : PdfReference|null
$metadata  : PdfReference|null
$nameField  : PdfName|null
$objectNumber  : int
$oc  : PdfReference|null
$opi  : PdfDictionary|null
$ptData  : PdfReference|null
$sMask  : PdfReference|null
$sMaskInData  : int|null
$structParent  : int|null
$width  : int

Methods

__construct()  : mixed
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.

Constants

Properties

$generationNumber

public int $generationNumber = 0

Methods

__construct()

public __construct(int $width, int $height, mixed $colorSpace[, int $bitsPerComponent = 8 ][, string $data = '' ]) : mixed
Parameters
$width : int
$height : int
$colorSpace : mixed
$bitsPerComponent : int = 8
$data : string = ''

setFilter()

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
string

toPdf()

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.

Return values
string

        
On this page

Search results