com.aspose.pdf

Interfaces

Classes

Enums

Exceptions

com.aspose.pdf

Class XFA



  • public final class XFA
    extends Object

    Represents XML form regarding XML Forms Architecture (XFA).

    • Method Detail

      • getTemplate

        public com.aspose.ms.System.Xml.XmlNode getTemplate()

        XFA Template component of an XFA form.

        Returns:
        XmlNode object
      • tryGetTemplateString

        public String tryGetTemplateString(String value)
        Tries to export calculation script from XFA form. Otherwise returns the empty string;
        Parameters:
        value - The tag name
        Returns:
        String instance
      • getForm

        public com.aspose.ms.System.Xml.XmlNode getForm()

        Gets XFA Form Component of an XFA form.

        Returns:
        XmlNode object
      • getDatasets

        public com.aspose.ms.System.Xml.XmlNode getDatasets()

        XFA Datasets component of an XFA form.

        Returns:
        XmlNode object
      • getConfig

        public com.aspose.ms.System.Xml.XmlNode getConfig()

        XFA Config component of an XFA form.

        Returns:
        XmlNode object
      • getXDP

        public com.aspose.ms.System.Xml.XmlDocument getXDP()

        XML Data Package (all XFA form components within a surrounding XML container).

        Returns:
        XmlDocument object
      • get_Item

        public String get_Item(String path)

        Gets data node value according path.

        Parameters:
        path - Data node path, e.g. form1[0].Subform1[0].Subform2[0].Subform3[0].TextField[0]. Be sure to include indices even if data contains only single occurences of each nodes, i.e. write node1[0].node2[0]... instead of node1.node2...
        Returns:
        Data node value.
      • set_Item

        public void set_Item(String path,
                             String value)

        Gets data node value according path.

        Parameters:
        path - String value
        value - String value
      • getFieldNames

        public String[] getFieldNames()

        List of field names in the form template.

        Returns:
        array of String values
      • getFieldTemplate

        public com.aspose.ms.System.Xml.XmlNode getFieldTemplate(String fieldName)

        Returns XML node of XFA field tempalte.

        Parameters:
        fieldName - Path of the field which template must be found.
        Returns:
        XL node with field template.
      • getFieldTemplates

        public com.aspose.ms.System.Xml.XmlNodeList getFieldTemplates()

        Returns list of all field templates on XFA form.

        Returns:
        List of field templates.
      • getNamespaceManager

        public com.aspose.ms.System.Xml.XmlNamespaceManager getNamespaceManager()

        Returns namespace manager with namespaces used for template and data.

        Returns:
        XmlNamespaceManager object
      • getNamespaceManager_

        public com.aspose.ms.System.Xml.XmlNamespaceManager getNamespaceManager_()

        Gets the namespace for the XFA form. The following namepsaces are defined: "data" for form data and "tpl" for form template.

        Returns:
        XmlNamespaceManager object
      • flattenXfaField

        public static void flattenXfaField(com.aspose.ms.System.Xml.XmlNode field)

        Flatten field of XFA form.

        Parameters:
        field - XFA form field node.
      • beginCachedUpdates

        public void beginCachedUpdates()

        Start cached updates mode. All changes made to XFA will be cached and saved into document structure at EndCachedUpdates call. This allows to improve preformacne by avoiding redudant operations on saving XML packets into document when a lot of changes to XFA are made.

      • endCachedUpdates

        public void endCachedUpdates()

        Ends cahced updates and saves all data into document structure.

      • setFieldImage

        public void setFieldImage(String fieldName,
                                  InputStream image)

        Sets image for XFA field.

        Parameters:
        fieldName - Name of the field.
        image - Stream which contains image.
      • setFieldImageInternal

        public void setFieldImageInternal(String fieldName,
                                          com.aspose.ms.System.IO.Stream image)
      • getFieldsWithTextValuesMap

        public HashMap<String,String> getFieldsWithTextValuesMap()

        Returns map with short field name and it's string value for all fields.

        Returns:
        HashMap<String, String> object
      • getXfaField

        public final com.aspose.pdf.XfaFieldInteractive getXfaField(String path)