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 [, $asArray = false ]
):

Resolves the qualified name of a form field.

Parameters
$terminalFieldDictionary : SetaPDF_Core_Type_Dictionary

The terminal field of the form field

$asArray
 
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 [, array|null &$objects = null ]]
): void

Read all terminal fields objects.

Parameters
$fields : array|null
 
$objects : array|null
 
Exceptions

Throws SetaPDF_Core_SecHandler_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

addResource()

public SetaPDF_Core_Document_Catalog_AcroForm::addResource (
$type [, $object = null ]
):

Adds a resource.

Parameters
$type
 
$object
 
Exceptions

Throws InvalidArgumentException

Throws SetaPDF_Core_SecHandler_Exception

cleanUp()

Release cycled references.

getCalculationOrderArray()

Get and creates the calculation order array.

Parameters
$create
 
Exceptions

Throws SetaPDF_Core_SecHandler_Exception

getDefaultResources()

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

Get the default resources of the AcroForm.

Parameters
$create
 
$entryKey
 
Exceptions

Throws SetaPDF_Core_SecHandler_Exception

getDictionary()

public SetaPDF_Core_Document_Catalog_AcroForm::getDictionary (
[ $create = false ]
):

Get and creates the AcroForm dictionary.

Parameters
$create
 
Exceptions

Throws SetaPDF_Core_SecHandler_Exception

getDocument()

Get the document instance.

getFieldsArray()

public SetaPDF_Core_Document_Catalog_AcroForm::getFieldsArray (
[ $create = false ]
):

Get and creates the fields array.

Parameters
$create
 
Exceptions

Throws SetaPDF_Core_SecHandler_Exception

getTerminalFieldsObjects()

isNeedAppearancesSet()

Checks if the NeedAppearances flag is set or not.

Exceptions

Throws SetaPDF_Core_SecHandler_Exception

isXfaForm()

Checks if a XFA key is present.

Exceptions

Throws SetaPDF_Core_SecHandler_Exception

removeXfaInformation()

Removes the XFA entry if present.

Exceptions

Throws SetaPDF_Core_SecHandler_Exception

setNeedAppearances()

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

Set the NeedAppearances flag.

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

Parameters
$needAppearances
 
Exceptions

Throws SetaPDF_Core_SecHandler_Exception