Table of Contents

Class XfaForm

Namespace
MiPdf.Forms
Assembly
MiPdf.dll

Access to the XFA part of a form (/AcroForm /XFA): packets and the form data (datasets). Typically used for "static" XFA forms that also contain AcroForm fields. Rendering of dynamic XFA is not supported.

public sealed class XfaForm
Inheritance
XfaForm
Inherited Members

Properties

Exists

True if the form contains XFA.

public bool Exists { get; }

Property Value

bool

Methods

FillData(string)

Replaces the form data. xml is the data root element (e.g. the content exported by Adobe: <form1>...</form1>), an xfa:data element or a complete xfa:datasets element.

public void FillData(string xml)

Parameters

xml string

FillData(XmlNode)

Replaces the form data with the given XML node (see FillData(string)).

public void FillData(XmlNode node)

Parameters

node XmlNode

GetData()

Returns the XML of the form data (the content of xfa:data), or null.

public string? GetData()

Returns

string

GetPackets()

The XFA packets by name (e.g. "template", "datasets"); a single-stream XFA is returned as "xdp".

public IReadOnlyDictionary<string, byte[]> GetPackets()

Returns

IReadOnlyDictionary<string, byte[]>

Remove()

Removes the XFA, so that viewers use the AcroForm fields (common when the XFA data is not maintained).

public void Remove()