id | string | Element id, p{page}-e{n}: the n-th element in reading order on the page where the element starts. Unique within the file. Stable for the same file through the same engine_version, and nothing more: do not parse it or sort by it. |
type | string | What the element is. title is the document title; heading is a section heading; paragraph is running text, and also page headers and footers (see role); list groups list_item elements; table holds cells; figure is a picture or chart; caption and footnote belong to a table, figure or code block; formula is a mathematical expression; code is a code block; checkbox is a form checkbox.One of title, heading, paragraph, list, list_item, table, figure, caption, footnote, formula, code, checkbox |
role | string | body for the document's content. header and footer for text repeated at the top or bottom of pages, such as running titles and page numbers, which most consumers filter out.One of body, header, footer |
textoptional | string | The element's text. On a table, one string for consumers who want the table as text: its caption(s), then its cells as a Markdown table, then its footnote(s), separated by blank lines; the cells are in table. The caption and footnotes are also elements of their own, so a consumer joining every element's text sees them twice. Absent on list (its text is in its items) and on figure. |
rawoptional | string | The text exactly as the source held it, present only when it differs from text (for example a list item whose source text includes its bullet). |
text_sourceoptional | string | Where text came from. embedded: the file contains the text itself. ocr: the text was recognised from pixels, so it may hold recognition errors. mixed: some of each. A scanned PDF that already carries a hidden text layer reads as embedded. Present whenever text is.One of embedded, ocr, mixed |
pages | array of integer | The pages this element is on, from 1, ascending. Empty only for an element with no position on any page. |
boxes | array of pageBox | Where the element sits, one box per region. Most elements have one; an element continuing across a page or column break has one per part. A list has the box enclosing its items, per page. |
headings | array of string | The text of the document's own headings above this element, outermost first. Empty before the first heading. When a document marks every heading at the same level, this holds only the nearest one. |
parentoptional | string | id of the list this item belongs to. On list_item only. |
leveloptional | integer | Heading depth, from 1 for the outermost. On heading only. |
orderedoptional | boolean | Whether the list is numbered. On list only. |
markeroptional | string | The item's own numbering or bullet as printed, such as (a), 1. or iii.. On list_item only, absent when the item has none. |
checkedoptional | boolean | Whether the checkbox is ticked. On checkbox only. |
code_languageoptional | string | The programming language of the code block, when known. On code only. |
tableoptional | table | |
imageoptional | image | |
captionsoptional | array of string | ids of this element's captions. On table, figure and code only. |
footnotesoptional | array of string | ids of this element's footnotes. On table, figure and code only. |