FPDFAvail_IsFormAvail method

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

Check if form data is ready for initialization, if not, get the |FX_DOWNLOADHINTS|.

avail - handle to document availability provider. hints - pointer to a download hints interface. Populated if form is not ready for initialization.

Returns one of: PDF_FORM_ERROR: A common eror, in general incorrect parameters. PDF_FORM_NOTAVAIL: Data not available. PDF_FORM_AVAIL: Data available. PDF_FORM_NOTEXIST: No form data.

This function can be called only after FPDFAvail_GetDocument() is called. The application should call this function whenever new data arrives and process all the generated download |hints|, if any, until the function |PDF_FORM_ERROR|, |PDF_FORM_AVAIL| or |PDF_FORM_NOTEXIST|. if hints is nullptr, the function just check current form availability.

Applications can then perform page loading. It is recommend to call FPDFDOC_InitFormFillEnvironment() when |PDF_FORM_AVAIL| is returned.

Implementation

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