get_page_map
Retrieves a page's structural map (headings, tables, figures, formulas, captions) to locate elements by ID and region for text extraction or image retrieval.
Instructions
The structure of one page: headings, tables, figures, formulas and captions. Gives one line for each element: its ID (for example p7.T1), its type, its region [x0, y0, x1, y1] in pt (origin at the top left of the page) and its text or caption. Use the IDs with get_element_text and get_page_image. The element map of a large new document can take minutes to build. Until it is complete, the result tells so: then use get_index, search_text and get_page_image with a page or a region.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | Yes | The page number, from 1, as get_index and search_text give it. | |
| document | Yes | The document: its reference from list_documents, project_status or add_document (the first 12 characters of its SHA-256). A longer SHA-256 prefix or the numeric document ID also works. | |
| all_elements | No | True: also list each text element (paragraph, list item); else they are only counted. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |