FPDFAnnot_GetStringValue method

int FPDFAnnot_GetStringValue(
  1. FPDF_ANNOTATION annot,
  2. FPDF_BYTESTRING key,
  3. Pointer<FPDF_WCHAR> buffer,
  4. int buflen,
)

Experimental API. Get the string value corresponding to |key| in |annot|'s dictionary. |buffer| is only modified if |buflen| is longer than the length of contents. Note that if |key| does not exist in the dictionary or if |key|'s corresponding value in the dictionary is not a string (i.e. the value is not of type FPDF_OBJECT_STRING or FPDF_OBJECT_NAME), then an empty string would be copied to |buffer| and the return value would be 2. On other errors, nothing would be added to |buffer| and the return value would be 0.

annot - handle to an annotation. key - the key to the requested dictionary entry, encoded in UTF-8. 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.

Implementation

int FPDFAnnot_GetStringValue(
  FPDF_ANNOTATION annot,
  FPDF_BYTESTRING key,
  ffi.Pointer<FPDF_WCHAR> buffer,
  int buflen,
) {
  return _FPDFAnnot_GetStringValue(annot, key, buffer, buflen);
}