SetaPDF_Core_XObject_Form Class representing a Form XObject

File: /SetaPDF v2/Core/XObject/Form.php

Class hierarchy

Implements

Summary

Constants

TYPE_COLOR_SPACE

public const string SetaPDF_Core_Resource::TYPE_COLOR_SPACE = 'ColorSpace'

Type constant

TYPE_EXT_G_STATE

public const string SetaPDF_Core_Resource::TYPE_EXT_G_STATE = 'ExtGState'

Type constant

TYPE_FONT

public const string SetaPDF_Core_Resource::TYPE_FONT = 'Font'

Type constant

TYPE_PATTERN

public const string SetaPDF_Core_Resource::TYPE_PATTERN = 'Pattern'

Type constant

TYPE_PROC_SET

public const string SetaPDF_Core_Resource::TYPE_PROC_SET = 'ProcSet'

Type constant

TYPE_PROPERTIES

public const string SetaPDF_Core_Resource::TYPE_PROPERTIES = 'Properties'

Type constant

TYPE_SHADING

public const string SetaPDF_Core_Resource::TYPE_SHADING = 'Shading'

Type constant

TYPE_X_OBJECT

public const string SetaPDF_Core_Resource::TYPE_X_OBJECT = 'XObject'

Type constant


Properties

$_bbox

The BBox rectangle

$_canvas

The canvas object for this form XObject

$_indirectObject

The indirect object of the XObject


Static Methods

create()

freeCache()

public static SetaPDF_Core_XObject::freeCache (): void

Release XObject instances by a document instance.

Parameters
$document : SetaPDF_Core_Document
 

get()

Get an external object by an indirect object/reference.

Parameters
$xObjectReference : SetaPDF_Core_Type_IndirectObjectInterface
 
$subType : string
 
Exceptions

Throws SetaPDF_Exception_NotImplemented


Methods

__construct()

The constructor.

Parameters
$indirectObject : SetaPDF_Core_Type_IndirectObjectInterface
 

_getBBox()

Get the bounding box after applying the transformation matrix.

cleanUp()

public SetaPDF_Core_XObject::cleanUp (
void
): void

Release memory and cycled references.

draw()

public SetaPDF_Core_XObject_Form::draw (
SetaPDF_Core_Canvas $canvas [, float $x = 0.0 [, float $y = 0.0 [, float $width = null [, float $height = null ]]]]
): mixed|void

Draw the external object on the canvas.

Parameters
$canvas : SetaPDF_Core_Canvas
 
$x : float
 
$y : float
 
$width : float
 
$height : float
 

ensureDefaultKeys()

Ensures the default keys.

getBBox()

Get the BBox value or rectangle.

Parameters
$asRect : boolean
 
Exceptions

Throws SetaPDF_Core_Type_Exception

Throws SetaPDF_Core_Type_IndirectReference_Exception

getCanvas()

Get the canvas for this form XObject.

getGroup()

Get a group attributes object.

getHeight()

public SetaPDF_Core_XObject_Form::getHeight (
[ float $width = null ]
): float

Get the height of the XObject.

Parameters
$width : float

To get the height in relation to a width value keeping the aspect ratio

See

getIndirectObject()

Get the indirect object of this XObject.

Parameters
$document : SetaPDF_Core_Document|null
 

getMatrix()

public SetaPDF_Core_XObject_Form::getMatrix (
[ boolean $asArray = false ]
): boolean|SetaPDF_Core_Geometry_Matrix|array

Get the form matrix.

Parameters
$asArray : boolean

Defines whether the matrix be returned as an array or as a matrix instance.

getObject()

Get the indirect object of this XObject.

Parameters
$observe : bool
 

getResourceType()

public SetaPDF_Core_XObject::getResourceType (
void
): string

Get the resource type for external objects.

See

getStreamProxy()

getWidth()

public SetaPDF_Core_XObject_Form::getWidth (
[ float $height = null ]
): float

Get the width of the XObject.

Parameters
$height : float

To get the width in relation to a height value keeping the aspect ratio

See

setGroup()

Set the group attributes object.

Parameters
$group : false|SetaPDF_Core_TransparencyGroup
 
Exceptions

Throws InvalidArgumentException

setMatrix()

Set the form matrix.

Parameters
$matrix : int[]|SetaPDF_Core_Geometry_Matrix

An array of six numbers or a matrix instance.