FPDFAttachment_GetFile method
- FPDF_ATTACHMENT attachment,
- Pointer<
Void> buffer, - int buflen,
- Pointer<
UnsignedLong> out_buflen,
Experimental API. Get the file data of |attachment|. When the attachment file data is readable, true is returned, and |out_buflen| is updated to indicate the file data size. |buffer| is only modified if |buflen| is non-null and long enough to contain the entire file data. Callers must check both the return value and the input |buflen| is no less than the returned |out_buflen| before using the data.
Otherwise, when the attachment file data is unreadable or when |out_buflen| is null, false is returned and |buffer| and |out_buflen| remain unmodified.
attachment - handle to an attachment. buffer - buffer for holding the file data from |attachment|. buflen - length of the buffer in bytes. out_buflen - pointer to the variable that will receive the minimum buffer size to contain the file data of |attachment|.
Returns true on success, false otherwise.
Implementation
int FPDFAttachment_GetFile(
FPDF_ATTACHMENT attachment,
ffi.Pointer<ffi.Void> buffer,
int buflen,
ffi.Pointer<ffi.UnsignedLong> out_buflen,
) {
return _FPDFAttachment_GetFile(attachment, buffer, buflen, out_buflen);
}