PageRef
A page of a Document, held by its ID: moving pages doesn’t retarget it (ADR 0028 F2).
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get id():
string
The page’s stable ID (p12.0).
Returns
Section titled “Returns”string
Get Signature
Section titled “Get Signature”get index():
number
The page’s current 0-based index.
Throws
Section titled “Throws”LaminaError unknown-page when it is gone.
Returns
Section titled “Returns”number
Get Signature
Section titled “Get Signature”get info():
PageInfoJs
The page’s facts now.
Throws
Section titled “Throws”LaminaError unknown-page when it is gone.
Returns
Section titled “Returns”PageInfoJs
Methods
Section titled “Methods”text()
Section titled “text()”text(
options?):PageText
The page’s text: lines in reading order, runs, and every glyph’s quad in page space. Needs a document opened while the extract or text module was loaded.
Parameters
Section titled “Parameters”options?
Section titled “options?”skipInvisible leaves out invisible text (OCR layers).
Returns
Section titled “Returns”Example
Section titled “Example”await init({ extract: true });const doc = Document.open(bytes);const text = doc.page(0).text().text();Throws
Section titled “Throws”LaminaError extract-module-not-loaded for a document opened in the base
module; unknown-page; reading errors (data-pending for a range document: use ensure).