PDFiumPathObject
Defined in: src/document/page-object.ts:514
Path object on a PDF page.
Provides methods for constructing and querying paths (moves, lines, bezier curves).
Extends
Section titled “Extends”Accessors
Section titled “Accessors”bounds
Section titled “bounds”Get Signature
Section titled “Get Signature”get bounds():
Rect
Defined in: src/document/page-object.ts:99
Bounding box in page coordinates (points, origin at bottom-left).
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”dashPattern
Section titled “dashPattern”Get Signature
Section titled “Get Signature”get dashPattern():
DashPattern|null
Defined in: src/document/page-object.ts:158
Get the dash pattern of this page object.
Returns
Section titled “Returns”DashPattern | null
Inherited from
Section titled “Inherited from”fillColour
Section titled “fillColour”Get Signature
Section titled “Get Signature”get fillColour():
Colour|null
Defined in: src/document/page-object.ts:104
Get the fill colour of this page object.
Returns
Section titled “Returns”Colour | null
Inherited from
Section titled “Inherited from”hasClipPath
Section titled “hasClipPath”Get Signature
Section titled “Get Signature”get hasClipPath():
boolean
Defined in: src/document/page-object.ts:194
Whether this page object has a clip path applied.
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”hasTransparency
Section titled “hasTransparency”Get Signature
Section titled “Get Signature”get hasTransparency():
boolean
Defined in: src/document/page-object.ts:176
Check if this page object has transparency.
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”PDFiumPageObject.hasTransparency
lineCap
Section titled “lineCap”Get Signature
Section titled “Get Signature”get lineCap():
LineCapStyle
Defined in: src/document/page-object.ts:134
Get the line cap style of this page object.
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”lineJoin
Section titled “lineJoin”Get Signature
Section titled “Get Signature”get lineJoin():
LineJoinStyle
Defined in: src/document/page-object.ts:146
Get the line join style of this page object.
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”markCount
Section titled “markCount”Get Signature
Section titled “Get Signature”get markCount():
number
Defined in: src/document/page-object.ts:238
Get the number of content marks on this page object.
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”Get Signature
Section titled “Get Signature”get marks():
PageObjectMark[]
Defined in: src/document/page-object.ts:263
Get all content marks from this page object.
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”matrix
Section titled “matrix”Get Signature
Section titled “Get Signature”get matrix():
TransformMatrix|null
Defined in: src/document/page-object.ts:122
Get the transformation matrix of this page object.
Returns
Section titled “Returns”TransformMatrix | null
Inherited from
Section titled “Inherited from”rotatedBounds
Section titled “rotatedBounds”Get Signature
Section titled “Get Signature”get rotatedBounds():
QuadPoints|null
Defined in: src/document/page-object.ts:188
Get the rotated bounding box of this page object as quad points.
Returns
Section titled “Returns”QuadPoints | null
Inherited from
Section titled “Inherited from”PDFiumPageObject.rotatedBounds
segmentCount
Section titled “segmentCount”Get Signature
Section titled “Get Signature”get segmentCount():
number
Defined in: src/document/page-object.ts:552
Get the number of segments in this path.
Returns
Section titled “Returns”number
strokeColour
Section titled “strokeColour”Get Signature
Section titled “Get Signature”get strokeColour():
Colour|null
Defined in: src/document/page-object.ts:110
Get the stroke colour of this page object.
Returns
Section titled “Returns”Colour | null
Inherited from
Section titled “Inherited from”strokeWidth
Section titled “strokeWidth”Get Signature
Section titled “Get Signature”get strokeWidth():
number|null
Defined in: src/document/page-object.ts:116
Get the stroke width of this page object.
Returns
Section titled “Returns”number | null
Inherited from
Section titled “Inherited from”Get Signature
Section titled “Get Signature”get type():
PageObjectType
Defined in: src/document/page-object.ts:94
The type of this page object.
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”addMark()
Section titled “addMark()”addMark(
name):PageObjectMark|null
Defined in: src/document/page-object.ts:282
Add a content mark to this page object.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
name | string | The mark name (e.g., ‘Artifact’, ‘Span’) |
Returns
Section titled “Returns”PageObjectMark | null
The mark data, or null if failed
Inherited from
Section titled “Inherited from”bezierTo()
Section titled “bezierTo()”bezierTo(
x1,y1,x2,y2,x3,y3):boolean
Defined in: src/document/page-object.ts:528
Add a cubic Bezier curve to the path.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
x1 | number |
y1 | number |
x2 | number |
y2 | number |
x3 | number |
y3 | number |
Returns
Section titled “Returns”boolean
closePath()
Section titled “closePath()”closePath():
boolean
Defined in: src/document/page-object.ts:534
Close the current subpath by connecting the current point to the start point.
Returns
Section titled “Returns”boolean
destroy()
Section titled “destroy()”destroy():
void
Defined in: src/document/page-object.ts:227
Destroy this page object and free its underlying resources.
Page objects are borrowed views — they do not own the underlying handle and become invalid when the parent page is disposed.
Only call this for page objects that have NOT been inserted into a page. Once an object is added to a page via builder methods, it is owned by the page and must not be destroyed manually.
After calling destroy(), any further access to this object’s properties
or methods will throw.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”getDrawMode()
Section titled “getDrawMode()”getDrawMode(): {
fillMode:PathFillMode;stroke:boolean; } |null
Defined in: src/document/page-object.ts:546
Get the draw mode for this path.
Returns
Section titled “Returns”{ fillMode: PathFillMode; stroke: boolean; } | null
getMark()
Section titled “getMark()”getMark(
index):PageObjectMark|null
Defined in: src/document/page-object.ts:249
Get a content mark by index.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
index | number | Zero-based mark index |
Returns
Section titled “Returns”PageObjectMark | null
The mark information, or null if not found
Inherited from
Section titled “Inherited from”getSegment()
Section titled “getSegment()”getSegment(
index):PDFiumPathSegment|null
Defined in: src/document/page-object.ts:563
Get a segment from this path at the specified index.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
index | number | The segment index |
Returns
Section titled “Returns”PDFiumPathSegment | null
A path segment, or null on failure
lineTo()
Section titled “lineTo()”lineTo(
x,y):boolean
Defined in: src/document/page-object.ts:522
Add a line segment from the current point to the specified coordinates.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
x | number |
y | number |
Returns
Section titled “Returns”boolean
moveTo()
Section titled “moveTo()”moveTo(
x,y):boolean
Defined in: src/document/page-object.ts:516
Move the current point to the specified coordinates.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
x | number |
y | number |
Returns
Section titled “Returns”boolean
removeMark()
Section titled “removeMark()”removeMark(
index):boolean
Defined in: src/document/page-object.ts:298
Remove a content mark from this page object by index.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
index | number | Zero-based mark index |
Returns
Section titled “Returns”boolean
True if successful
Inherited from
Section titled “Inherited from”setBlendMode()
Section titled “setBlendMode()”setBlendMode(
blendMode):void
Defined in: src/document/page-object.ts:182
Set the blend mode of this page object.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
blendMode | BlendMode |
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”setDashPattern()
Section titled “setDashPattern()”setDashPattern(
pattern):boolean
Defined in: src/document/page-object.ts:164
Set the dash pattern of this page object.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
pattern | DashPattern |
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”PDFiumPageObject.setDashPattern
setDashPhase()
Section titled “setDashPhase()”setDashPhase(
phase):boolean
Defined in: src/document/page-object.ts:170
Set the dash phase of this page object.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
phase | number |
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”setDrawMode()
Section titled “setDrawMode()”setDrawMode(
fillMode,stroke):boolean
Defined in: src/document/page-object.ts:540
Set the draw mode for this path.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
fillMode | PathFillMode |
stroke | boolean |
Returns
Section titled “Returns”boolean
setLineCap()
Section titled “setLineCap()”setLineCap(
lineCap):boolean
Defined in: src/document/page-object.ts:140
Set the line cap style of this page object.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
lineCap | LineCapStyle |
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”setLineJoin()
Section titled “setLineJoin()”setLineJoin(
lineJoin):boolean
Defined in: src/document/page-object.ts:152
Set the line join style of this page object.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
lineJoin | LineJoinStyle |
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”setMatrix()
Section titled “setMatrix()”setMatrix(
matrix):boolean
Defined in: src/document/page-object.ts:128
Set the transformation matrix of this page object.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
matrix | TransformMatrix |
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”transformClipPath()
Section titled “transformClipPath()”transformClipPath(
matrix):void
Defined in: src/document/page-object.ts:200
Transform the clip path of this page object.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
matrix | TransformMatrix |
Returns
Section titled “Returns”void