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

# XForm

## Overview

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

Represents a Form XObject (reusable content stream with its own resources).

This class provides 5 methods for working with XForm objects in .NET programs.
Available methods include: `CreateNewForm`, `Dispose`, `FreeMemory`, `GetResources`.
All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.
Properties: `BBox`, `Contents`, `DecodedBytes`, `IT`, `Matrix`, `Name`, and 4 more.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `Name` | `string?` | Read/Write | The name of this XForm in the page's XObject resources dict. |
| `Contents` | `OperatorCollection` | Read | The Form XObject's content stream as a typed operator collection. |
| `DecodedBytes` | `byte[]` | Read | The raw decoded content bytes of this XForm. |
| `BBox` | `Rectangle?` | Read/Write | The bounding box of this XForm. |
| `Rectangle` | `Rectangle` | Read | Alias for BBox; both names are exposed. |
| `Subtype` | `string` | Read | The XObject Subtype (always "Form" for XForm instances). |
| `Matrix` | `Matrix` | Read/Write | The Form's /Matrix entry (the transformation applied when the form is painted). |
| `IT` | `string?` | Read | The Form's /Intent (IT) entry; null when absent. |
| `Opi` | `Opi` | Read | Open Prepress Interface (OPI) wrapper. |
| `Resources` | `Resources` | Read | Form XObject resources (fonts / images / nested XObjects) declared on this XForm's stream dict. |

## Methods

| Signature | Description |
|-----------|-------------|
| `GetResources()` | Method-style resources accessor. |
| `GetResources(allowCreate: bool)` | Method-style resources accessor with create-on-demand. |
| `Dispose()` | Releases resources held by this XForm. |
| `FreeMemory()` | Free decoded-content cache. |
| `CreateNewForm(source: Page, document: Document)` | Construct a new XForm from a source page's content stream and register it on document. |

## See Also

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