FPDF_GetNamedDest function

  1. @Native<FPDF_DEST Function(FPDF_DOCUMENT, Int, Pointer<Void>, Pointer<Long>)>(FPDF_DOCUMENT, ffi.Int, ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Long>)>()
FPDF_DEST FPDF_GetNamedDest(
  1. FPDF_DOCUMENT document,
  2. int index,
  3. Pointer<Void> buffer,
  4. Pointer<Long> buflen,
)

Function: FPDF_GetNamedDest Get the named destination by index. Parameters: document - Handle to a document index - The index of a named destination. buffer - The buffer to store the destination name, used as wchar_t*. buflen in/out - Size of the buffer in bytes on input, length of the result in bytes on output or -1 if the buffer is too small. Return value: The destination handle for a given index, or NULL if there is no named destination corresponding to |index|. Comments: Call this function twice to get the name of the named destination:

  1. First time pass in |buffer| as NULL and get buflen.
  2. Second time pass in allocated |buffer| and buflen to retrieve |buffer|, which should be used as wchar_t*.

If buflen is not sufficiently large, it will be set to -1 upon return.

Implementation

@ffi.Native<
  FPDF_DEST Function(
    FPDF_DOCUMENT,
    ffi.Int,
    ffi.Pointer<ffi.Void>,
    ffi.Pointer<ffi.Long>,
  )
>()
external FPDF_DEST FPDF_GetNamedDest(
  FPDF_DOCUMENT document,
  int index,
  ffi.Pointer<ffi.Void> buffer,
  ffi.Pointer<ffi.Long> buflen,
);