SetaPDF_Core_Document_Catalog_AcroForm Class representing a basic AcroForm

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

Class hierarchy

Summary

Properties

$_catalog

The documents catalog instance

$_dictionary


Static Methods

resolveFieldName()

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

Resolves the qualified name of a form field.

Parameters
$terminalFieldDictionary : SetaPDF_Core_Type_Dictionary

The terminal field of the form field

$asArray : boolean
 

Methods

__construct()

public SetaPDF_Core_Document_Catalog_AcroForm::__construct ( SetaPDF_Core_Document_Catalog $catalog )

The constructor.

Parameters
$catalog : SetaPDF_Core_Document_Catalog
 

_readTerminalFieldsObjects()

private void SetaPDF_Core_Document_Catalog_AcroForm::_readTerminalFieldsObjects ( array|null $fields, array &$objects )

Read all terminal fields objects.

Parameters
$fields : array|null
 
$objects : array
 

addDefaultEntriesAndValues()

public void SetaPDF_Core_Document_Catalog_AcroForm::addDefaultEntriesAndValues ( void )

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.

addResource()

public string SetaPDF_Core_Document_Catalog_AcroForm::addResource ( string|SetaPDF_Core_Resource $type [, null|SetaPDF_Core_Resource|SetaPDF_Core_Type_IndirectObjectInterface $object = null ] )

Adds a resource.

Parameters
$type : string|SetaPDF_Core_Resource
 
$object : null|SetaPDF_Core_Resource|SetaPDF_Core_Type_IndirectObjectInterface
 
Exceptions

Throws InvalidArgumentException

cleanUp()

public void SetaPDF_Core_Document_Catalog_AcroForm::cleanUp ( void )

Release cycled references.

getCalculationOrderArray()

public SetaPDF_Core_Type_Array|false SetaPDF_Core_Document_Catalog_AcroForm::getCalculationOrderArray ( [ boolean $create = false ] )

Get and creates the calculation order array.

Parameters
$create : boolean
 

getDefaultResources()

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

Get the default resources of the AcroForm.

Parameters
$create : bool
 
$entryKey : null
 

getDictionary()

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

Get and creates the AcroForm dictionary.

Parameters
$create : boolean
 

getDocument()

public SetaPDF_Core_Document SetaPDF_Core_Document_Catalog_AcroForm::getDocument ( void )

Get the document instance.

getFieldsArray()

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

Get and creates the fields array.

Parameters
$create : boolean
 

getTerminalFieldsObjects()

public array SetaPDF_Core_Document_Catalog_AcroForm::getTerminalFieldsObjects ( void )

Get the terminal fields objects of a document.

isNeedAppearancesSet()

public boolean SetaPDF_Core_Document_Catalog_AcroForm::isNeedAppearancesSet ( void )

Checks if the NeedAppearances flag is set or not.

isXfaForm()

public boolean SetaPDF_Core_Document_Catalog_AcroForm::isXfaForm ( void )

Checks if a XFA key is present.

removeXfaInformation()

public bool SetaPDF_Core_Document_Catalog_AcroForm::removeXfaInformation ( void )

Removes the XFA entry if present.

setNeedAppearances()

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

Set the NeedAppearances flag.

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

Parameters
$needAppearances : boolean