Skip to content

API reference / Common / PageView

Interface: PageView ​

One on-screen page projected into viewport space (CSS px), the unit an HTML overlay layer positions page chrome from: a corner button from a page's box, an inter-page divider from the gap between two consecutive boxes. Unlike everything else here, x/y/width/height are CSS px, not document points — the worker has already applied the current scroll/zoom — so an absolutely-positioned element drops straight onto the page. Recomputed each painted frame and streamed from the worker; see the overlay layer.

Properties ​

PropertyDescription
index
number
0-based page index, in the document's page order.
x
number
Top-left and size of the page in the viewport, CSS px.
y
number
-
width
number
-
height
number
-
rotation
number
The page's display rotation as quarter turns clockwise (0/1/2/3 = 0°/90°/180°/270°). The rect above is the axis-aligned on-screen box; an overlay projecting page-anchored geometry needs this to orient itself on a rotated page.