FPDFJavaScriptAction_GetScript function

  1. @Native<UnsignedLong Function(FPDF_JAVASCRIPT_ACTION, Pointer<FPDF_WCHAR>, UnsignedLong)>(FPDF_JAVASCRIPT_ACTION, ffi.Pointer<FPDF_WCHAR>, ffi.UnsignedLong)>()
int FPDFJavaScriptAction_GetScript(
  1. FPDF_JAVASCRIPT_ACTION javascript,
  2. Pointer<FPDF_WCHAR> buffer,
  3. int buflen
)

Experimental API. Get the script from the |javascript| handle. |buffer| is only modified if |buflen| is longer than the length of the script. On errors, |buffer| is unmodified and the returned length is 0.

javascript - handle to an JavaScript action. buffer - buffer for holding the name, encoded in UTF-16LE. buflen - length of the buffer in bytes.

Returns the length of the JavaScript action name in bytes.

Implementation

@ffi.Native<
  ffi.UnsignedLong Function(
    FPDF_JAVASCRIPT_ACTION,
    ffi.Pointer<FPDF_WCHAR>,
    ffi.UnsignedLong,
  )
>()
external int FPDFJavaScriptAction_GetScript(
  FPDF_JAVASCRIPT_ACTION javascript,
  ffi.Pointer<FPDF_WCHAR> buffer,
  int buflen,
);