I want to extract all the text from the image and preserve the same format of the image

ALAGARSAMY Vanitha 40 Reputation points
2024-12-10T17:22:13.4966667+00:00
  • I want to extract all the text from the image and preserve the same format of the image
  • So I have subscribed Free trial of Azure AI document intelligence - Form recognizer API Kind : FormRecognizer Pricing tier : Free Location: East Asia
  • I have tried Form recognizer - Document analysis API . I could able to extract the text from the image but it doesn't preserve the format of the original image.

Can you please assist me which API should i use if i want to extract all the text from the image and preserve the format?

Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
1,974 questions
0 comments No comments
{count} votes

Accepted answer
  1. Azar 26,585 Reputation points MVP
    2024-12-10T18:30:08.91+00:00

    Hi there ALAGARSAMY Vanitha

    Thanks for using QandA platform

    you can use the Azure Form Recognizer Layout Model or the Read API from Azure AI Document Intelligence. These APIs provide bounding box information for each text line, enabling you to recreate the original layout. The Layout Model is ideal for extracting text, tables, and spatial data from documents with complex formatting, while the Read API is designed for OCR, focusing on extracting text with positional details. After extracting the text and layout data, you can use visualization libraries like Matplotlib or PIL to overlay the text onto a blank canvas to reconstruct the original format.

    in short -

    For documents with complex layouts (e.g., tables or forms), use the Layout Model.

    For simple text extraction with layout details, the Read API is sufficient.

    Refer to the Form Recognizer Layout API documentation or the Read API documentation for implementation details.

    If this helps kindly accept the answer thanks much.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.