Click or drag to resize

PdfiumFPDF_LoadMemDocument Method

Open and load a PDF document from memory.

Namespace: Patagames.Pdf
Assembly: Patagames.Pdf (in Patagames.Pdf.dll) Version: 4.94.2704
Syntax
public static IntPtr FPDF_LoadMemDocument(
	byte[] file_content,
	int content_size,
	string password
)

Parameters

file_content  Byte
Pointer to a buffer containing the PDF document.
content_size  Int32
Number of bytes in the PDF document.
password  String
A string used as the password for PDF file. If no password needed, empty or NULL can be used

Return Value

IntPtr
A handle to the loaded document. If failed, IntPtr.Zero is returned.
Remarks
The memory buffer must remain valid when the document is open. Loaded document can be closed by FPDF_CloseDocument(IntPtr). If this function fails, you can use FPDF_GetLastError to retrieve the reason why it fails.
Note  Note
With the trial version the documents which size is smaller than 1024 Kb, or greater than 10 Mb can be loaded without any restrictions. For other documents the allowed ranges is 1.5 - 2 Mb; 2.5 - 3 Mb; 3.5 - 4 Mb; 4.5 - 5 Mb and so on.
See Also