.. index:: 
  !TextField Class

.. _id3_document_text_field_class:

===============================================================================
TextField Class
===============================================================================

Namespace: :ref:`id3.Document<reference_document>`

.. toctree::
  :hidden:

  bounds<bounds>
  clone<clone>
  confidence<confidence>
  name<name>
  value<value>


Definition
----------
.. line-block::
    Represents a text field extracted from a document.

.. tab-set::

    .. tab-item:: Python
      :sync: Python

      .. code:: Python

        class TextField

    .. tab-item:: Dart
      :sync: Dart

      .. code:: Dart

        class TextField implements Finalizable

    .. tab-item:: C#
      :sync: C#

      .. code:: C#

        public partial class TextField

    .. tab-item:: Java
      :sync: Java

      .. code:: Java

        public class TextField implements AutoCloseable, Serializable

    .. tab-item:: Swift
      :sync: Swift

      .. code:: Swift

        public class TextField

    .. tab-item:: C
      :sync: C

      .. code:: C

        typedef struct id3DocumentTextField *ID3_DOCUMENT_TEXT_FIELD;



Usage
-----

.. tab-set::

    .. tab-item:: Python
      :sync: Python

      .. code:: Python

        textFieldInstance = TextField()
        # ...

      **Explicit destruction**

      .. code:: Python

        # ...
        del textFieldInstance

    .. tab-item:: Dart
      :sync: Dart

      .. code:: Dart

        final textFieldInstance = sdk.TextField();
        // ...

      **Explicit destruction**

      .. code:: Dart

        // ...
        textFieldInstance.dispose()

    .. tab-item:: C#
      :sync: C#

      .. code:: C#

        using (var textFieldInstance = new TextField())
        {
           // ...
        }

      **Explicit destruction**

      .. code:: C#

        var textFieldInstance = new TextField()
        // ...
        textFieldInstance.Dispose()

    .. tab-item:: Java
      :sync: Java

      .. code:: Java

        try (TextField textFieldInstance = new TextField()) {
        // ...
        }

      **Explicit destruction**

      .. code:: Java

        TextField textFieldInstance = new TextField();
        // ...
        textFieldInstance.close();

    .. tab-item:: Swift
      :sync: Swift

      .. code:: Swift

        private var textFieldInstance: TextField? = nil
        textFieldInstance = try TextField()

    .. tab-item:: C
      :sync: C

      .. code:: C

        ID3_DOCUMENT_TEXT_FIELD hTextField{};
        int err = id3DocumentTextField_Initialize(&hTextField);
        if (err == ID3_SUCCESS) {
            // ...
            id3DocumentTextField_Dispose(&hTextField);
        }


Properties
----------

.. list-table:: 
  :width: 100%
  :widths: 30 5 65
  :header-rows: 1

  * - Name
    - Type
    - Description
  * - :ref:`bounds<id3_document_text_field_bounds_class_member>`
    - :ref:`Rectangle<id3_document_rectangle_struct>`
    - Boundaries of the text field in the image.
  * - :ref:`confidence<id3_document_text_field_confidence_class_member>`
    - float
    - Confidence score for the value read from the text field.
  * - :ref:`name<id3_document_text_field_name_class_member>`
    - string
    - Name of the text field.
  * - :ref:`value<id3_document_text_field_value_class_member>`
    - string
    - Value of the text field.

Methods
-------

.. list-table:: 
  :width: 100%
  :widths: 30 70
  :header-rows: 1

  * - Name
    - Description
  * - :ref:`clone<id3_document_text_field_clone_class_method>`
    - Clones the TextField object.
