Default page width and height dimensions for Document Intelligence Read API

Ishan Kaul 20 Reputation points
2023-12-06T21:39:44.4366667+00:00

Hi! I am writing some code to call the Azure Document Intelligence Read api and OCR some PDFs. Everything is working fine so far, but I had a question about part of the AnalyzeResult api. I noticed in the AnalyzeResult -> DocumentPage class that is returned, the height and width are optional fields. In what situation would it not return a value, and is there a default value for either of these fields that I should assume is accurate if the field is not returned? Tried looking through the documentation and could not find any information on this.

Thanks!

Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
2,111 questions
{count} votes

Accepted answer
  1. dupammi 8,615 Reputation points Microsoft External Staff
    2023-12-07T11:58:37.45+00:00

    Hi @Ishan Kaul ,

    Thank you for using the Microsoft Q&A platform.

    Yes, you are correct. The 'width' and 'height' fields in the AnalyzeResult -> DocumentPage class of the Azure Document Intelligence Read API are optional fields.

    If the API is unable to determine the width and height of a page, it will not return a value for these fields. There are several reasons why the API may not be able to determine the page dimensions, including:

    • The page is blank or contains no text or images.
    • The page is damaged or corrupted, making it difficult to extract the dimensions.
    • The page is an unusual size or shape that the API is not able to recognize.
    • If the API is unable to determine the page dimensions, it will not return a value for these fields.

    Regarding your next question, there is no default value for either the 'width' or 'height' fields in the 'DocumentPage' class of the Azure Document Intelligence Read API that you should assume is accurate if the field is not returned.

    Hope this helps.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful.

    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.