Skip to content

WorkerPDFiumPage

@scaryterry/pdfium


Defined in: src/context/worker-client.ts:490

High-level worker-backed PDF page.

readonly height: number

Defined in: src/context/worker-client.ts:506

Page height in points.


readonly index: number

Defined in: src/context/worker-client.ts:498

Zero-based page index.


readonly width: number

Defined in: src/context/worker-client.ts:502

Page width in points.

get disposed(): boolean

Defined in: src/core/disposable.ts:74

Whether this resource has been disposed.

boolean

AsyncDisposable.disposed


get id(): string

Defined in: src/context/worker-client.ts:522

Internal page ID used by the worker protocol.

string

[asyncDispose](): Promise<void>

Defined in: src/core/disposable.ts:210

Asynchronously dispose of this resource.

Promise<void>

AsyncDisposable.[asyncDispose]


addInkStroke(annotationIndex, points): Promise<number>

Defined in: src/context/worker-client.ts:722

ParameterType
annotationIndexnumber
pointsobject[]

Promise<number>


appendAnnotationAttachmentPoints(annotationIndex, points): Promise<boolean>

Defined in: src/context/worker-client.ts:712

ParameterType
annotationIndexnumber
pointsSerialisedQuadPoints

Promise<boolean>


applyRedactions(fillColour?, removeIntersectingAnnotations?): Promise<{ appliedRegionCount: number; insertedFillObjectCount: number; removedAnnotationCount: number; removedObjectCount: number; }>

Defined in: src/context/worker-client.ts:618

ParameterType
fillColour?Colour
removeIntersectingAnnotations?boolean

Promise<{ appliedRegionCount: number; insertedFillObjectCount: number; removedAnnotationCount: number; removedObjectCount: number; }>


canFormUndo(): Promise<boolean>

Defined in: src/context/worker-client.ts:645

Promise<boolean>


createAnnotation(subtype): Promise<SerialisedAnnotation>

Defined in: src/context/worker-client.ts:659

ParameterType
subtypeAnnotationType

Promise<SerialisedAnnotation>


dispose(): Promise<void>

Defined in: src/core/disposable.ts:221

Alias for Symbol.asyncDispose for explicit calls.

Promise<void>

AsyncDisposable.dispose


findText(query, flags?): Promise<TextSearchResult[]>

Defined in: src/context/worker-client.ts:594

ParameterType
querystring
flags?TextSearchFlags

Promise<TextSearchResult[]>


flatten(flags?): Promise<FlattenResult>

Defined in: src/context/worker-client.ts:613

ParameterType
flags?FlattenFlags

Promise<FlattenResult>


formUndo(): Promise<boolean>

Defined in: src/context/worker-client.ts:650

Promise<boolean>


generateContent(): Promise<boolean>

Defined in: src/context/worker-client.ts:727

Promise<boolean>


getAnnotations(): Promise<SerialisedAnnotation[]>

Defined in: src/context/worker-client.ts:559

Promise<SerialisedAnnotation[]>


getCharacterInfo(charIndex): Promise<CharacterInfo | undefined>

Defined in: src/context/worker-client.ts:599

ParameterType
charIndexnumber

Promise<CharacterInfo | undefined>


getCharAtPos(x, y): Promise<CharAtPosResponse | null>

Defined in: src/context/worker-client.ts:584

ParameterType
xnumber
ynumber

Promise<CharAtPosResponse | null>


getCharBox(charIndex): Promise<CharBox | undefined>

Defined in: src/context/worker-client.ts:604

ParameterType
charIndexnumber

Promise<CharBox | undefined>


getFormSelectedText(): Promise<string | null>

Defined in: src/context/worker-client.ts:640

Promise<string | null>


getFormWidgets(): Promise<SerialisedFormWidget[]>

Defined in: src/context/worker-client.ts:631

Promise<SerialisedFormWidget[]>


getLinks(): Promise<SerialisedLink[]>

Defined in: src/context/worker-client.ts:569

Promise<SerialisedLink[]>


getPageInfo(): Promise<PageInfoResponse>

Defined in: src/context/worker-client.ts:554

Promise<PageInfoResponse>


getPageObjects(): Promise<SerialisedPageObject[]>

Defined in: src/context/worker-client.ts:564

Promise<SerialisedPageObject[]>


getStructureTree(): Promise<StructureElement[] | null>

Defined in: src/context/worker-client.ts:579

Promise<StructureElement[] | null>


getText(): Promise<string>

Defined in: src/context/worker-client.ts:537

Extract text from this page.

Promise<string>


getTextInRect(left, top, right, bottom): Promise<string>

Defined in: src/context/worker-client.ts:589

ParameterType
leftnumber
topnumber
rightnumber
bottomnumber

Promise<string>


getTextLayout(): Promise<{ rects: Float32Array; text: string; }>

Defined in: src/context/worker-client.ts:545

Extract text and text rectangles from this page.

Promise<{ rects: Float32Array; text: string; }>


getWebLinks(): Promise<WebLink[]>

Defined in: src/context/worker-client.ts:574

Promise<WebLink[]>


removeAnnotation(annotationIndex): Promise<boolean>

Defined in: src/context/worker-client.ts:664

ParameterType
annotationIndexnumber

Promise<boolean>


render(options, onProgress?): Promise<RenderResult>

Defined in: src/context/worker-client.ts:529

Render this page.

ParameterType
optionsRenderOptions
onProgress?ProgressCallback

Promise<RenderResult>


setAnnotationAttachmentPoints(annotationIndex, quadIndex, points): Promise<boolean>

Defined in: src/context/worker-client.ts:703

ParameterType
annotationIndexnumber
quadIndexnumber
pointsSerialisedQuadPoints

Promise<boolean>


setAnnotationBorder(annotationIndex, hRadius, vRadius, borderWidth): Promise<boolean>

Defined in: src/context/worker-client.ts:693

ParameterType
annotationIndexnumber
hRadiusnumber
vRadiusnumber
borderWidthnumber

Promise<boolean>


setAnnotationColour(annotationIndex, colourType, colour): Promise<boolean>

Defined in: src/context/worker-client.ts:674

ParameterType
annotationIndexnumber
colourTypeAnnotationColourType
colourColour

Promise<boolean>


setAnnotationFlags(annotationIndex, flags): Promise<boolean>

Defined in: src/context/worker-client.ts:683

ParameterType
annotationIndexnumber
flagsnumber

Promise<boolean>


setAnnotationRect(annotationIndex, rect): Promise<boolean>

Defined in: src/context/worker-client.ts:669

ParameterType
annotationIndexnumber
rectRect

Promise<boolean>


setAnnotationString(annotationIndex, key, value): Promise<boolean>

Defined in: src/context/worker-client.ts:688

ParameterType
annotationIndexnumber
keystring
valuestring

Promise<boolean>


setAnnotationURI(annotationIndex, uri): Promise<boolean>

Defined in: src/context/worker-client.ts:717

ParameterType
annotationIndexnumber
uristring

Promise<boolean>


setRotation(rotation): Promise<void>

Defined in: src/context/worker-client.ts:736

ParameterType
rotationPageRotation

Promise<void>