FPDFText_GetText function

  1. @Native<Int Function(FPDF_TEXTPAGE, Int, Int, Pointer<FPDF_WCHAR>)>(FPDF_TEXTPAGE, ffi.Int, ffi.Int, ffi.Pointer<ffi.UnsignedShort>)>()
int FPDFText_GetText(
  1. FPDF_TEXTPAGE text_page,
  2. int start_index,
  3. int count,
  4. Pointer<FPDF_WCHAR> result,
)

Function: FPDFText_GetText Extract unicode text string from the page. Parameters: text_page - Handle to a text page information structure. Returned by FPDFText_LoadPage function. start_index - Index for the start characters. count - Number of UCS-2 values to be extracted. result - A buffer (allocated by application) receiving the extracted UCS-2 values. The buffer must be able to hold count UCS-2 values plus a terminator. Return Value: Number of characters written into the result buffer, including the trailing terminator. Comments: This function ignores characters without UCS-2 representations. It considers all characters on the page, even those that are not visible when the page has a cropbox. To filter out the characters outside of the cropbox, use FPDF_GetPageBoundingBox() and FPDFText_GetCharBox().

Implementation

@ffi.Native<
  ffi.Int Function(
    FPDF_TEXTPAGE,
    ffi.Int,
    ffi.Int,
    ffi.Pointer<ffi.UnsignedShort>,
  )
>()
external int FPDFText_GetText(
  FPDF_TEXTPAGE text_page,
  int start_index,
  int count,
  ffi.Pointer<ffi.UnsignedShort> result,
);