简体   繁体   中英

Azure Form Recognizer only extracts table when specifying page on which the table is located

I have a four page PDF file and page 3 contains a table I want to extract:

with open(f"{data_dir}/{file_name}", "rb") as fd:
    document = fd.read()

    poller = document_analysis_client.begin_analyze_document("prebuilt-layout", document)
    result = poller.result()
    print(result)

Running this, it does not find any tables in the document.

However when I run exactly the same only adding page="3" or page="2-" as an argument to begin_analyze_document , it works perfectly!

    document = fd.read()

    poller = document_analysis_client.begin_analyze_document("prebuilt-layout", document, pages="3")
    result = poller.result()
    print(result)

What is going on here?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM