.. index:: 
  !DocumentDetector.documentWidthRatio Property

.. _id3_document_document_detector_document_width_ratio_class_member:

===============================================================================
DocumentDetector.documentWidthRatio Property
===============================================================================

Module: :ref:`DocumentDetector<id3_document_document_detector_class>`

Type: float

Definition
----------

Ratio of the estimated width of the searched document in the image.

.. hint:: Default value is 1.


.. tab-set::

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

    .. code:: Python

      document_width_ratio: float


    **Exceptions**

      .. line-block::

        :ref:`DocumentException<id3_document_document_exception>`
        An error has occurred during Document Library execution.

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

    .. code:: Dart

      double get documentWidthRatio => getDocumentWidthRatio();
      set documentWidthRatio(double value) => setDocumentWidthRatio(value);


    **Exceptions**

      .. line-block::

        :ref:`DocumentException<id3_document_document_exception>`
        An error has occurred during Document Library execution.

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

    .. code:: C#

      public float documentWidthRatio
      {
          get => GetdocumentWidthRatio();
          set => SetdocumentWidthRatio(ref value);
      }


    **Exceptions**

      .. line-block::

        :ref:`DocumentException<id3_document_document_exception>`
        An error has occurred during Document Library execution.

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

    .. code:: Java

      public float getDocumentWidthRatio() throws DocumentException
      public void setDocumentWidthRatio(float documentWidthRatio) throws DocumentException


    **Exceptions**

      .. line-block::

        :ref:`DocumentException<id3_document_document_exception>`
        An error has occurred during Document Library execution.

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

    .. code:: Swift

      public var documentWidthRatio: Float
          get {
              return try! getDocumentWidthRatio()
          }
      }


    **Exceptions**

      .. line-block::

        :ref:`DocumentException<id3_document_document_exception>`
        An error has occurred during Document Library execution.

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

    .. code:: C

      int id3DocumentDetector_GetDocumentWidthRatio (ID3_DOCUMENT_DETECTOR hDocumentDetector, float * documentWidthRatio)
      int id3DocumentDetector_SetDocumentWidthRatio (ID3_DOCUMENT_DETECTOR hDocumentDetector, float documentWidthRatio)

    **Returns**
   
      .. line-block::

        ``int``
        An error code.
        See :ref:`id3DocumentError<id3_document_document_error_enum>` file for the list of possible error codes.

