SetaPDF_Core_Document_Catalog_AcroForm Class representing a basic AcroForm

File: /SetaPDF v2/Core/Document/Catalog/AcroForm.php

Class hierarchy

Summary

Properties

$_catalog

The documents catalog instance

$_dictionary


Static Methods

resolveFieldName()

public static SetaPDF_Core_Document_Catalog_AcroForm::resolveFieldName (
SetaPDF_Core_Type_Dictionary $terminalFieldDictionary [, boolean $asArray = false ]
): string|array

Resolves the qualified name of a form field.

Parameters
$terminalFieldDictionary : SetaPDF_Core_Type_Dictionary

The terminal field of the form field

$asArray : boolean
 
Return Values

In UTF-8 encoding

Exceptions

Throws SetaPDF_Core_Type_Exception


Methods

__construct()

_readTerminalFieldsObjects()

private SetaPDF_Core_Document_Catalog_AcroForm::_readTerminalFieldsObjects (
[ array|null $fields = null [, SetaPDF_Core_Type_IndirectObjectInterface[] &$objects = null ]]
): void

Read all terminal fields objects.

Parameters
$fields : array|null
 
$objects : SetaPDF_Core_Type_IndirectObjectInterface[]
 
Exceptions

Throws SetaPDF_Core_SecHandler_Exception

Throws SetaPDF_Core_Type_Exception

Throws SetaPDF_Core_Type_IndirectReference_Exception

addDefaultEntriesAndValues()

Add default values and resources to the AcroForm dictionary.

This is needed to avoid undefined behavior in adobe reader. If for example base fonts are missing, the file is digital signed and include links, the signature panel will never be displayed.

Exceptions

Throws SetaPDF_Core_SecHandler_Exception

Throws SetaPDF_Core_Type_Exception

cleanUp()

Release cycled references.

delete()

Deletes a field by its terminal field object.

Make sure that you only pass an object that was really resolved from this instance. There are no internal checks which validates the object content but a simple check for an FT value.

ALSO NOTE: This method will NOT remove the reference from the Annotations entry of a page but only in entries in the AcroForm structure (Fields and CO).

Parameters
$terminalFieldObject : SetaPDF_Core_Type_IndirectObjectInterface
 
Exceptions

Throws SetaPDF_Core_Type_Exception

Throws SetaPDF_Core_SecHandler_Exception

Throws SetaPDF_Core_Type_IndirectReference_Exception

getCalculationOrderArray()

Get and creates the calculation order array.

Parameters
$create : boolean
 
Exceptions

Throws SetaPDF_Core_SecHandler_Exception

Throws SetaPDF_Core_Type_Exception

getDefaultResources()

public SetaPDF_Core_Document_Catalog_AcroForm::getDefaultResources (
[ bool $create = false [, null $entryKey = null ]]
): bool|SetaPDF_Core_Type_Dictionary

Get the default resources of the AcroForm.

Parameters
$create : bool
 
$entryKey : null
 
Exceptions

Throws SetaPDF_Core_SecHandler_Exception

Throws SetaPDF_Core_Type_Exception

getDictionary()

Get and creates the AcroForm dictionary.

Parameters
$create : boolean
 
Exceptions

Throws SetaPDF_Core_SecHandler_Exception

Throws SetaPDF_Core_Type_Exception

getDocument()

Get the document instance.

getFieldsArray()

Get and creates the fields array.

Parameters
$create : boolean
 
Exceptions

Throws SetaPDF_Core_SecHandler_Exception

Throws SetaPDF_Core_Type_Exception

isNeedAppearancesSet()

Checks if the NeedAppearances flag is set or not.

Exceptions

Throws SetaPDF_Core_SecHandler_Exception

Throws SetaPDF_Core_Type_Exception

isXfaForm()

Checks if a XFA key is present.

Exceptions

Throws SetaPDF_Core_SecHandler_Exception

Throws SetaPDF_Core_Type_Exception

removeXfaInformation()

Removes the XFA entry if present.

Exceptions

Throws SetaPDF_Core_SecHandler_Exception

Throws SetaPDF_Core_Type_Exception

setNeedAppearances()

public SetaPDF_Core_Document_Catalog_AcroForm::setNeedAppearances (
[ boolean $needAppearances = true ]
): void

Set the NeedAppearances flag.

This flag indicates the viewer to rerender the form field appearances.

Parameters
$needAppearances : boolean
 
Exceptions

Throws SetaPDF_Core_SecHandler_Exception

Throws SetaPDF_Core_Type_Exception