FPDF_GetXFAPacketContent function

  1. @Native<FPDF_BOOL Function(FPDF_DOCUMENT, Int, Pointer<Void>, UnsignedLong, Pointer<UnsignedLong>)>(FPDF_DOCUMENT, ffi.Int, ffi.Pointer<ffi.Void>, ffi.UnsignedLong, ffi.Pointer<ffi.UnsignedLong>)>()
int FPDF_GetXFAPacketContent(
  1. FPDF_DOCUMENT document,
  2. int index,
  3. Pointer<Void> buffer,
  4. int buflen,
  5. Pointer<UnsignedLong> out_buflen,
)

Experimental API. Function: FPDF_GetXFAPacketContent Get the content of a packet in the XFA array. Parameters: document - Handle to the document. index - Index number of the packet. 0 for the first packet. buffer - Buffer for holding the content of the XFA packet. buflen - Length of |buffer| in bytes. out_buflen - Pointer to the variable that will receive the minimum buffer size needed to contain the content of the XFA packet. Return value: Whether the operation succeeded or not.

|document| must be valid and |index| must be in the range [0, N), where N is the value returned by FPDF_GetXFAPacketCount(). |out_buflen| must not be NULL. When the aforementioned arguments are valid, the operation succeeds, and |out_buflen| receives the content size. |buffer| is only modified if |buffer| is non-null and long enough to contain the content. Callers must check both the return value and the input |buflen| is no less than the returned |out_buflen| before using the data in |buffer|.

Implementation

@ffi.Native<
  FPDF_BOOL Function(
    FPDF_DOCUMENT,
    ffi.Int,
    ffi.Pointer<ffi.Void>,
    ffi.UnsignedLong,
    ffi.Pointer<ffi.UnsignedLong>,
  )
>()
external int FPDF_GetXFAPacketContent(
  FPDF_DOCUMENT document,
  int index,
  ffi.Pointer<ffi.Void> buffer,
  int buflen,
  ffi.Pointer<ffi.UnsignedLong> out_buflen,
);