Skip to content

API reference / Common / Engine types / ImagePageInfo

Interface: ImagePageInfo ​

Decode-free manifest entry for a page — enough to count, order, and size every page without loading its body. Carried eagerly on the document.

The page is the model: size points from its top-left, the coordinates its markup is drawn in. Its image is drawn into image_rect on it, flipped image_flipped and turned image_rotation, and the page shows the part of the image inside size. Turning, flipping, cropping and resizing a page each transform the page — its size, where its image is drawn, and its markup alike — never the image's pixels: a save to the image's own format renders the page at its resolution.

Properties ​

PropertyDescription
id
string
-
width
number
The image's width in pixels, as loaded.
height
number
The image's height in pixels, as loaded.
dpi
[number, number] | null
The image's resolution (dpi_x, dpi_y) along its own width and height, or None ([DEFAULT_DPI] is assumed).
size
Size
The page's size in points, from its top-left.
imageRect
Rect
Where the whole image is drawn on the page, in its points — turned, so a quarter-turned image's rect is as tall as the image is wide. Past the page's edges where the page is cropped.
imageRotation
ImageRotation
The turn the image is drawn at within image_rect.
imageFlipped
boolean
The image drawn mirrored left to right, along its own width, before it is turned image_rotation — together the eight ways an image can lie.
markup
string
The page's markup — the shapes drawn over its image.