FPDFAnnot_GetAP method

int FPDFAnnot_GetAP(
  1. FPDF_ANNOTATION annot,
  2. int appearanceMode,
  3. Pointer<FPDF_WCHAR> buffer,
  4. int buflen,
)

Experimental API. Get the AP (appearance string) from |annot|'s dictionary for a given |appearanceMode|. |buffer| is only modified if |buflen| is large enough to hold the whole AP string. If |buflen| is smaller, the total size of the AP is still returned, but nothing is copied. If there is no appearance stream for |annot| in |appearanceMode|, an empty string is written to |buf| and 2 is returned. On other errors, nothing is written to |buffer| and 0 is returned.

annot - handle to an annotation. appearanceMode - the appearance mode (normal, rollover or down) for which to get the AP. 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_GetAP(
  FPDF_ANNOTATION annot,
  int appearanceMode,
  ffi.Pointer<FPDF_WCHAR> buffer,
  int buflen,
) {
  return _FPDFAnnot_GetAP(annot, appearanceMode, buffer, buflen);
}