SetaPDF_FormFiller_Xfa Class offering access to XFA data of a PDF form.
File: /SetaPDF v2/FormFiller/Xfa.php
Class hierarchy
Summary
Methods
- __construct()
- _evaluateValue()
- _findPacketStream()
- _setValueInForm()
- cleanUp()
- getBridge()
- getData()
- getDomDocument()
- getFormFiller()
- getFormNode()
- getFormNodeChecksum()
- getObject()
- getTemplate()
- getXml()
- getXmp()
- isDynamic()
- saveFormNode()
- saveTemplate()
- setData()
- setDefaultValue()
- setReadOnly()
- setValue()
- setXml()
- setXmp()
- syncAcroFormFields()
- syncDataNode()
Properties
$_data
The data node.
$_domDocument
The document instance of the full XDP packet.
$_form
The form node.
$_formFiller
The form filler instance
$_template
The template node.
Methods
__construct()
_evaluateValue()
Evaluates a native value to a data value.
Parameters
- $value : mixed
- $fieldNode : DOMElement
_findPacketStream()
Finds a packets stream by its name.
Parameters
- $array : SetaPDF_Core_Type_Array
- $name : string
- $create : boolean
Exceptions
Throws SetaPDF_Core_Type_Exception
_setValueInForm()
Creates the data node and sets the value in the form package.
Parameters
- $fieldName : string
- $value : mixed
Exceptions
Throws DOMException
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception
Throws SetaPDF_Exception
Throws SetaPDF_Exception_NotImplemented
Throws SetaPDF_FormFiller_Exception
getBridge()
Get the XFA bridge helper object.
Exceptions
Throws DOMException
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception
Throws SetaPDF_Exception
Throws SetaPDF_Exception_NotImplemented
Throws SetaPDF_FormFiller_Exception
getData()
Get the data node.
Parameters
- $create : bool
Exceptions
Throws DOMException
Throws SetaPDF_FormFiller_Exception
getDomDocument()
Get the DOMDocument instance of the XFA structure.
Exceptions
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception
Throws SetaPDF_Exception
Throws SetaPDF_Exception_NotImplemented
Throws SetaPDF_FormFiller_Exception
getFormNode()
Get the form node.
Exceptions
Throws DOMException
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception
Throws SetaPDF_Exception
Throws SetaPDF_Exception_NotImplemented
Throws SetaPDF_FormFiller_Exception
getFormNodeChecksum()
getObject()
Get the XFA pdf object.
Exceptions
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception
getTemplate()
Gets the template node from the XFA structure.
Exceptions
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Exception
Throws SetaPDF_Exception_NotImplemented
Throws SetaPDF_FormFiller_Exception
getXml()
Get the raw XFA (XML/XMP) data from the PDF document.
Exceptions
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception
Throws SetaPDF_Exception
getXmp()
Get the raw XFA (XML/XMP) from the PDF document.
Exceptions
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception
Throws SetaPDF_Exception
Throws SetaPDF_Exception_NotImplemented
See
isDynamic()
Checks if the XFA form is a dynamic or static form.
Exceptions
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception
Throws SetaPDF_Core_Type_Exception
saveFormNode()
Saves the form node to the XFA packages.
Exceptions
Throws DOMException
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception
Throws SetaPDF_Exception
Throws SetaPDF_Exception_NotImplemented
Throws SetaPDF_FormFiller_Exception
saveTemplate()
Saves the template node to the PDF structure.
Parameters
- $onlyIfUpdated : boolean
Save only if the template node was updated internally.
Exceptions
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Exception
Throws SetaPDF_Exception_NotImplemented
Throws SetaPDF_FormFiller_Exception
setData()
Set the content of the data node.
Parameters
- $xml : null|string
Exceptions
Throws SetaPDF_FormFiller_Exception
Throws Exception
setDefaultValue()
Set the default value for a specific field.
Parameters
- $fieldName : string
- $value : mixed
- $encoding : string
Exceptions
Throws DOMException
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception
Throws SetaPDF_Exception
Throws SetaPDF_Exception_NotImplemented
Throws SetaPDF_FormFiller_Exception
setReadOnly()
Set a field to read-only or to "open".
This method is called internally by the SetaPDF_FormFiller_Field_AbstractField::setReadOnly()
method.
Parameters
- $fieldName : string
- $readOnly : bool
Exceptions
Throws DOMException
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception
Throws SetaPDF_Exception
Throws SetaPDF_Exception_NotImplemented
Throws SetaPDF_FormFiller_Exception
setValue()
Sets a value by a field name.
This method is called internally if a fields value is changed to keep the XML data in sync. It should be used manually with care.
Parameters
- $fieldName : string
- $value : mixed
- $encoding : string
Exceptions
Throws DOMException
Throws SetaPDF_Core_Exception
Throws SetaPDF_Core_Font_Exception
Throws SetaPDF_Core_Parser_Pdf_InvalidTokenException
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception
Throws SetaPDF_Core_Type_IndirectReference_Exception
Throws SetaPDF_Exception
Throws SetaPDF_Exception_NotImplemented
Throws SetaPDF_FormFiller_Exception
setXml()
Set the raw XFA (XML/XMP) structure.
Parameters
- $domDocumentOrXml : DOMDocument|string
Exceptions
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception
Throws SetaPDF_FormFiller_Exception
setXmp()
Set the raw XFA (XML/XMP) structure.
Parameters
- $domDocumentOrXml : DOMDocument|string
Exceptions
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception
Throws SetaPDF_FormFiller_Exception
See
syncAcroFormFields()
Syncornizes the XFA form field values with the corresponding AcroForm fields.
If XML data were passed via the SetaPDF_FormFiller_Xfa::setData()
method this method will ensure that
the data in the corresponding AcroForm fields representations will get updated.
Exceptions
Throws DOMException
Throws SetaPDF_Core_Exception
Throws SetaPDF_Core_Font_Exception
Throws SetaPDF_Core_Parser_Pdf_InvalidTokenException
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception
Throws SetaPDF_Core_Type_IndirectReference_Exception
Throws SetaPDF_Exception
Throws SetaPDF_Exception_NotImplemented
Throws SetaPDF_FormFiller_Exception
syncDataNode()
Writes the data node back to the PDF document.
Exceptions
Throws DOMException
Throws SetaPDF_FormFiller_Exception