FPDFAnnot_GetOptionLabel method

int FPDFAnnot_GetOptionLabel(
  1. FPDF_FORMHANDLE hHandle,
  2. FPDF_ANNOTATION annot,
  3. int index,
  4. Pointer<FPDF_WCHAR> buffer,
  5. int buflen,
)

Experimental API. Get the string value for the label of the option at |index| in |annot|'s "Opt" dictionary. Intended for use with listbox and combobox widget annotations. |buffer| is only modified if |buflen| is longer than the length of contents. If index is out of range or in case of other error, nothing will be added to |buffer| and the return value will be 0. Note that return value of empty string is 2 for "\0\0".

hHandle - handle to the form fill module, returned by FPDFDOC_InitFormFillEnvironment. annot - handle to an annotation. index - numeric index of the option in the "Opt" array buffer - buffer for holding the value string, encoded in UTF-16LE. buflen - length of the buffer in bytes.

Returns the length of the string value in bytes. If |annot| does not have an "Opt" array, |index| is out of range or if any other error occurs, returns 0.

Implementation

int FPDFAnnot_GetOptionLabel(
  FPDF_FORMHANDLE hHandle,
  FPDF_ANNOTATION annot,
  int index,
  ffi.Pointer<FPDF_WCHAR> buffer,
  int buflen,
) {
  return _FPDFAnnot_GetOptionLabel(hHandle, annot, index, buffer, buflen);
}