Click or drag to resize

PdfTextGetCharIndexAtPos Method

Get the index of a character at or nearby a certain position on the page

Namespace:  Patagames.Pdf.Net
Assembly:  Patagames.Pdf (in Patagames.Pdf.dll) Version: 4.10.2704
Syntax
public int GetCharIndexAtPos(
	float x,
	float y,
	float xTolerance,
	float yTolerance
)

Parameters

x
Type: SystemSingle
X position in PDF "user space"
y
Type: SystemSingle
Y position in PDF "user space"
xTolerance
Type: SystemSingle
An x-axis tolerance value for character hit detection, in point unit.
yTolerance
Type: SystemSingle
A y-axis tolerance value for character hit detection, in point unit

Return Value

Type: Int32
The zero-based index of the character at, or nearby the point (x,y). If there is no character at or nearby the point, return value will be -1. If an error occurs, -3 will be returned.
See Also