FPDF_LoadCustomDocument method

FPDF_DOCUMENT FPDF_LoadCustomDocument(
  1. Pointer<FPDF_FILEACCESS> pFileAccess,
  2. FPDF_BYTESTRING password
)

Function: FPDF_LoadCustomDocument Load PDF document from a custom access descriptor. Parameters: pFileAccess - A structure for accessing the file. password - Optional password for decrypting the PDF file. Return value: A handle to the loaded document, or NULL on failure. Comments: The application must keep the file resources |pFileAccess| points to valid until the returned FPDF_DOCUMENT is closed. |pFileAccess| itself does not need to outlive the FPDF_DOCUMENT.

The loaded document can be closed with FPDF_CloseDocument().

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

FPDF_DOCUMENT FPDF_LoadCustomDocument(
  ffi.Pointer<FPDF_FILEACCESS> pFileAccess,
  FPDF_BYTESTRING password,
) {
  return _FPDF_LoadCustomDocument(pFileAccess, password);
}