.. index:: 
  !Document reading

.. _document_reading:

================
Document reading
================

The :ref:`DocumentReader<id3_document_document_reader_class>` class extracts data from ID documents. It requires as input an **aligned** image of a document (see :ref:`document_detection` for details)

.. important:: The document reader requires the relevant AI models to run.




Example
=======

The example below demonstrates how to detect a French driver's license from an image.

.. tab-set::

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

      .. literalinclude:: /../samples/sample.py
        :language: python
        :start-after: [document_reading]
        :end-before: [document_reading]
        :dedent: 4

See also
========

- :ref:`id3_document_document_reader_class`
- :ref:`id3_document_detected_document_class`
