FPDFText_GetCharBox function

  1. @Native<FPDF_BOOL Function(FPDF_TEXTPAGE, Int, Pointer<Double>, Pointer<Double>, Pointer<Double>, Pointer<Double>)>(FPDF_TEXTPAGE, ffi.Int, ffi.Pointer<ffi.Double>, ffi.Pointer<ffi.Double>, ffi.Pointer<ffi.Double>, ffi.Pointer<ffi.Double>)>()
int FPDFText_GetCharBox(
  1. FPDF_TEXTPAGE text_page,
  2. int index,
  3. Pointer<Double> left,
  4. Pointer<Double> right,
  5. Pointer<Double> bottom,
  6. Pointer<Double> top,
)

Function: FPDFText_GetCharBox Get bounding box of a particular character. Parameters: text_page - Handle to a text page information structure. Returned by FPDFText_LoadPage function. index - Zero-based index of the character. left - Pointer to a double number receiving left position of the character box. right - Pointer to a double number receiving right position of the character box. bottom - Pointer to a double number receiving bottom position of the character box. top - Pointer to a double number receiving top position of the character box. Return Value: On success, return TRUE and fill in |left|, |right|, |bottom|, and |top|. If |text_page| is invalid, or if |index| is out of bounds, then return FALSE, and the out parameters remain unmodified. Comments: All positions are measured in PDF "user space".

Implementation

@ffi.Native<
  FPDF_BOOL Function(
    FPDF_TEXTPAGE,
    ffi.Int,
    ffi.Pointer<ffi.Double>,
    ffi.Pointer<ffi.Double>,
    ffi.Pointer<ffi.Double>,
    ffi.Pointer<ffi.Double>,
  )
>()
external int FPDFText_GetCharBox(
  FPDF_TEXTPAGE text_page,
  int index,
  ffi.Pointer<ffi.Double> left,
  ffi.Pointer<ffi.Double> right,
  ffi.Pointer<ffi.Double> bottom,
  ffi.Pointer<ffi.Double> top,
);