---
Product: Aspose.PDF
Platform: net
Page Type: reference
Canonical URL: https://reference.aspose.org/pdf/net/XFA
---

# XFA

## Overview

`XFA` is a class in Aspose.PDF FOSS for .NET.

XmlNode-based accessor for the document's XFA packets (template / datasets / config / form / xdp).

This class provides 3 methods for working with XFA objects in .NET programs.
Available methods include: `GetFieldTemplate`, `GetFieldTemplates`, `SetFieldImage`.
All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.
Properties: `Config`, `Datasets`, `FieldNames`, `Form`, `NamespaceManager`, `Template`, and 1 more.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `NamespaceManager` | `XmlNamespaceManager` | Read | Namespace manager used when navigating the XFA XML packets. |
| `Datasets` | `XmlNode?` | Read | The XFA Datasets node, or null when the document has no XFA datasets. |
| `Template` | `XmlNode?` | Read | The XFA Template node, or null when absent. |
| `Config` | `XmlNode?` | Read | The XFA Config node. |
| `Form` | `XmlNode?` | Read | The XFA Form node. |
| `XDP` | `XmlDocument?` | Read | Composite XDP document wrapping all XFA packets, or null when no XFA is present. |
| `FieldNames` | `string[]` | Read | The XFA field names enumerated from the template. |

## Methods

| Signature | Description |
|-----------|-------------|
| `GetFieldTemplate(fieldName: string)` | Return the XFA template node for the named field, or null when unknown. |
| `GetFieldTemplates()` | Return every XFA template field node. |
| `SetFieldImage(fieldName: string, image: System.IO.Stream)` | Set the bytes of an XFA image field. |

## See Also

- [Aspose.PDF for .NET — Enterprise API Reference](https://reference.aspose.com/pdf/net/)