FPDFTextObj_GetText method

int FPDFTextObj_GetText(
  1. FPDF_PAGEOBJECT text_object,
  2. FPDF_TEXTPAGE text_page,
  3. Pointer<FPDF_WCHAR> buffer,
  4. int length,
)

Get the text of a text object.

text_object - the handle to the text object. text_page - the handle to the text page. buffer - the address of a buffer that receives the text. length - the size, in bytes, of |buffer|.

Returns the number of bytes in the text (including the trailing NUL character) on success, 0 on error.

Regardless of the platform, the |buffer| is always in UTF-16LE encoding. If |length| is less than the returned length, or |buffer| is NULL, |buffer| will not be modified.

Implementation

int FPDFTextObj_GetText(
  FPDF_PAGEOBJECT text_object,
  FPDF_TEXTPAGE text_page,
  ffi.Pointer<FPDF_WCHAR> buffer,
  int length,
) {
  return _FPDFTextObj_GetText(text_object, text_page, buffer, length);
}