FPDFAvail_IsDocAvail method

int FPDFAvail_IsDocAvail(
  1. FPDF_AVAIL avail,
  2. Pointer<FX_DOWNLOADHINTS> hints
)

Checks if the document is ready for loading, if not, gets download hints.

avail - handle to document availability provider. hints - pointer to a download hints interface.

Returns one of: PDF_DATA_ERROR: A common error is returned. Data availability unknown. PDF_DATA_NOTAVAIL: Data not yet available. PDF_DATA_AVAIL: Data available.

Applications should call this function whenever new data arrives, and process all the generated download hints, if any, until the function returns |PDF_DATA_ERROR| or |PDF_DATA_AVAIL|. if hints is nullptr, the function just check current document availability.

Once all data is available, call FPDFAvail_GetDocument() to get a document handle.

Implementation

int FPDFAvail_IsDocAvail(
  FPDF_AVAIL avail,
  ffi.Pointer<FX_DOWNLOADHINTS> hints,
) {
  return _FPDFAvail_IsDocAvail(avail, hints);
}