API referenceForms

pdfGetInIsXFAForm

Report whether the currently open import source

C
int32_t __stdcall pdfGetInIsXFAForm(PPDF IPDF);
Delphi
function pdfGetInIsXFAForm(const IPDF: PPDF): Integer; stdcall;

Purpose. Report whether the currently open import source document (opened via the pdfOpenImportFile* family for page/object import — see V03) itself carries an /AcroForm /XFA entry.

Description. This is an In-prefixed import-inspection getter, following the same guard convention as pdfGetInFieldCount (Field Lifecycle and Enumeration) and other GetIn* functions: it inspects the separate imported source document (FImportSrc), not the live document being edited/serialized — and has no relationship at all to the 13 by-Name/by-Index functions above, which all operate on the live document's own FXFAData packets. Guarded by HasImportFile (FImportSrc <> nil); if no import file is open, returns the dedicated sentinel NO_IMPORT_ERR (-1073742011) rather than 0. Otherwise dereferences the import source's Catalog → AcroForm, and reports whether that dictionary has an XFA key at all (no inspection of the XFA content itself — presence-only).

Parameters.

ParameterDescription
IPDFDocument handle (whose *import source*, not itself, is inspected).

Return value. 1 if the import source's /AcroForm has an /XFA key; 0 if it doesn't (or has no /AcroForm at all); NO_IMPORT_ERR (-1073742011) if no import file is currently open.

Remarks. To inspect the live document's own XFA content instead, use the 13 functions above (pdfGetXFAFormFieldCount etc.), which report 0/empty rather than NO_IMPORT_ERR when no datasets/template packet exists — there is no single "does the live document have XFA" boolean; the closest equivalent is pdfGetXFAFormFieldCount() > 0 (for datasets) or a successful pdfGetXFAFormFieldAccess call (for template).

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfGetInIsXFAForm(IntPtr IPDF);
Area
Forms
Category

Getters

Exported names

pdfGetInIsXFAForm

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.