FPDF_VIEWERREF_GetName function

  1. @Native<UnsignedLong Function(FPDF_DOCUMENT, FPDF_BYTESTRING, Pointer<Char>, UnsignedLong)>(FPDF_DOCUMENT, FPDF_BYTESTRING, ffi.Pointer<ffi.Char>, ffi.UnsignedLong)>()
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

@ffi.Native<
  ffi.UnsignedLong Function(
    FPDF_DOCUMENT,
    FPDF_BYTESTRING,
    ffi.Pointer<ffi.Char>,
    ffi.UnsignedLong,
  )
>()
external int FPDF_VIEWERREF_GetName(
  FPDF_DOCUMENT document,
  FPDF_BYTESTRING key,
  ffi.Pointer<ffi.Char> buffer,
  int length,
);