FPDF_VIEWERREF_GetName method

int FPDF_VIEWERREF_GetName(
  1. FPDF_DOCUMENT document,
  2. FPDF_BYTESTRING key,
  3. Pointer<Char> buffer,
  4. int length,
)

Function: FPDF_VIEWERREF_GetName Gets the contents for a viewer ref, with a given key. The value must be of type "name". Parameters: document - Handle to the loaded document. key - Name of the key in the viewer pref dictionary, encoded in UTF-8. buffer - Caller-allocate buffer to receive the key, or NULL

  • to query the required length. length - Length of the buffer. Return value: The number of bytes in the contents, including the NULL terminator. Thus if the return value is 0, then that indicates an error, such as when |document| is invalid. If |length| is less than the required length, or |buffer| is NULL, |buffer| will not be modified.

Implementation

int FPDF_VIEWERREF_GetName(
  FPDF_DOCUMENT document,
  FPDF_BYTESTRING key,
  ffi.Pointer<ffi.Char> buffer,
  int length,
) {
  return _FPDF_VIEWERREF_GetName(document, key, buffer, length);
}