SetaPDF_FormFiller_Field_AbstractField Abstract form field
File: /SetaPDF v2/FormFiller/Field/AbstractField.php
Class hierarchy
Summary
Methods
- __construct()
- _checkPermission()
- _getAppearanceReference()
- _getBorderWidthAndStyle()
- _getFontRelation()
- _postDelete()
- _preDelete()
- _preFlatten()
- _recreateAppearance()
- cleanUp()
- delete()
- flatten()
- getAnnotation()
- getAppearanceCanvas()
- getAppearanceFont()
- getAppearanceFontSize()
- getAppearanceTextColor()
- getAppearanceTextColorSpace()
- getDefaultAppearanceData()
- getFieldDictionary()
- getFieldFlags()
- getFieldObject()
- getFields()
- getLineHeightFactor()
- getName()
- getNoExport()
- getNormalAppearanceObject()
- getOriginalQualifiedName()
- getPage()
- getPageNumber()
- getQualifiedName()
- getTooltip()
- isFieldFlagSet()
- isReadOnly()
- isRequired()
- setAppearanceFont()
- setAppearanceFontSize()
- setAppearanceTextColor()
- setAppearanceTextColorSpace()
- setFieldFlags()
- setLineHeightFactor()
- setNoExport()
- setReadOnly()
- setRequired()
- setTooltip()
- unsetFieldFlags()
Properties
$_annotation
The annotation object of this form field
$_fontSize
The font size, which should be used to create the appearance
$_lineHeightFactor
The factor to calculate the line height based on the font size
$_originalQualifiedName
The name without the suffix
$_qualifiedName
The name including a suffix if needed ("Text#1")
$_textColorSpace
An individual color space object which should be used for setting the non-stroking color space
Methods
__construct()
The constructor.
Parameters
- $fields : SetaPDF_FormFiller_Fields
The fields instance
- $qualifiedName
The qualified name of the field
- $fieldObject
- $originalQualifiedName
The original qualified name of the field
_checkPermission()
Checks for form-filling permissions.
Parameters
- $permission
Exceptions
_getFontRelation()
Get the font relation and copy the resources to the Resources entry if needed.
Parameters
- $nDictionary : SetaPDF_Core_Type_Dictionary
- $fontName
Exceptions
Throws SetaPDF_FormFiller_Exception
_postDelete()
A method called after deleting a field.
This method forwards the deletion info to the fields instance.
_preDelete()
A method called before deleting a field.
This method forwards the deletion info to the fields instance.
_preFlatten()
A method called before flattening a field.
This method forwards the flatten info to the fields instance.
_recreateAppearance()
Recreate or creates the background appearance of the form field.
Parameters
- $circle
- $canvas
getAppearanceTextColorSpace()
Get the individual color space object which should be used for setting the non-stroking color space.
getLineHeightFactor()
Get the line height factor
The line height is calculated by this factor in relation to the font size:
$lineHeight = $fontSize * $lineHeightFactor
By default this value is calculated by the font bounding box values "ury - lly / 1000".
See
getNormalAppearanceObject()
Get or create the normal appearance object (the object referenced in the N entry).
Parameters
- $createNew
Pass true to force a recreation
setAppearanceFont()
Set the appearance font object.
Parameters
- $font : SetaPDF_Core_Font_FontInterface
- $size
setAppearanceTextColor()
Set an individual appearance text color.
Parameters
- $textColor : SetaPDF_Core_DataStructure_Color|null
setAppearanceTextColorSpace()
Set the individual color space object which should be used for setting the non-stroking color space.
Parameters
- $colorSpace : SetaPDF_Core_ColorSpace|null
setLineHeightFactor()
Set the line height factor
The line height is calculated by this factor in relation to the font size:
$lineHeight = $fontSize * $lineHeightFactor
By default this value is calculated by the font bounding box values "ury - lly / 1000".
Parameters
- $lineHeightFactor