FPDF_LoadMemDocument64 function

  1. @Native<FPDF_DOCUMENT Function(Pointer<Void>, Size, FPDF_BYTESTRING)>(ffi.Pointer<ffi.Void>, ffi.Size, FPDF_BYTESTRING)>()
FPDF_DOCUMENT FPDF_LoadMemDocument64(
  1. Pointer<Void> data_buf,
  2. int size,
  3. FPDF_BYTESTRING password
)

Experimental API. Function: FPDF_LoadMemDocument64 Open and load a PDF document from memory. Parameters: data_buf - Pointer to a buffer containing the PDF document. size - Number of bytes in the PDF document. password - A string used as the password for the PDF file. If no password is needed, empty or NULL can be used. Return value: A handle to the loaded document, or NULL on failure. Comments: The memory buffer must remain valid when the document is open. The loaded document can be closed by FPDF_CloseDocument. If this function fails, you can use FPDF_GetLastError() to retrieve the reason why it failed.

See the comments for FPDF_LoadDocument() regarding the encoding for |password|. Notes: If PDFium is built with the XFA module, the application should call FPDF_LoadXFA() function after the PDF document loaded to support XFA fields defined in the fpdfformfill.h file.

Implementation

@ffi.Native<
  FPDF_DOCUMENT Function(ffi.Pointer<ffi.Void>, ffi.Size, FPDF_BYTESTRING)
>()
external FPDF_DOCUMENT FPDF_LoadMemDocument64(
  ffi.Pointer<ffi.Void> data_buf,
  int size,
  FPDF_BYTESTRING password,
);