Skip to main content
interface DocumentPage
import { type DocumentPage } from "https://deno.land/x/aiformrecognizer@v1.1.0/mod.ts";

Content and layout elements extracted from a page from the input.

Properties

pageNumber: number

1-based page number in the input document.

optional
angle: number

The general orientation of the content in clockwise direction, measured in degrees between (-180, 180].

optional
width: number

The width of the image/PDF in pixels/inches, respectively.

optional
height: number

The height of the image/PDF in pixels/inches, respectively.

optional
unit: LengthUnit

The unit used by the width, height, and polygon properties. For images, the unit is "pixel". For PDF, the unit is "inch".

spans: DocumentSpan[]

Location of the page in the reading order concatenated content.

optional
words: DocumentWord[]

Extracted words from the page.

optional
selectionMarks: DocumentSelectionMark[]

Extracted selection marks from the page.

optional
lines: DocumentLine[]

Extracted lines from the page, potentially containing both textual and visual elements.