I am using Microsoft Document AI Intelligence to analyze some forms. I am using the prebuilt-layout model as follows.
def layout(pdf_path):
with open(pdf_path, "rb") as f:
poller = document_intelligence_client_sections.begin_analyze_document(
"prebuilt-layout", f.read(), content_type="application/pdf",
output_content_format=ContentFormat.MARKDOWN,
)
result = poller.result()
return result
However, I am getting different result for same type for forms! The forms are same but the content are different, say, Name or DoB are different. In one call, its giving sections — and within the sections its showing the paragraphs, etc. In the different call, its returning paragraphs, etc. as root level elements. I can see its a major problem, while processing forms.
Second question is, can how can I call the same with image/jpg/png instead of pdf?
Can anyone help? Thank you in advance.