Class FormXObject
A Form XObject — a self-contained content stream that can be painted multiple times at different positions and scales (spec §8.10, Table 88). Form XObjects are used for watermarks, repeated graphics, and annotation appearance streams.
Inherited Members
Namespace: DRIT.Pdf.Content
Assembly: DRIT.Pdf.dll
Syntax
public sealed class FormXObject : Content
Constructors
FormXObject(PdfRect)
Initializes a new Form XObject with the specified bounding box. The content stream is initially empty — use the returned surface to draw into.
Declaration
public FormXObject(PdfRect boundingBox)
Parameters
| Type | Name | Description |
|---|---|---|
| PdfRect | boundingBox | The bounding box in form-space coordinates (spec §8.10, /BBox). |
FormXObject(PdfSize)
Initializes a new Form XObject from a PdfSize. The bounding box is set to [0, 0, width, height].
Declaration
public FormXObject(PdfSize size)
Parameters
| Type | Name | Description |
|---|---|---|
| PdfSize | size |
Properties
Bounds
Gets the bounding box of this form XObject (spec §8.10, /BBox entry).
Declaration
public override PdfRect Bounds { get; }
Property Value
| Type | Description |
|---|---|
| PdfRect |
Overrides
Matrix
Gets the matrix that maps form space to user space (spec §8.10, /Matrix entry).
Declaration
public PdfMatrix? Matrix { get; set; }
Property Value
| Type | Description |
|---|---|
| PdfMatrix |
Methods
SetBoundingBox(PdfRect)
Sets the bounding box of this form XObject.
Declaration
public void SetBoundingBox(PdfRect boundingBox)
Parameters
| Type | Name | Description |
|---|---|---|
| PdfRect | boundingBox |
ToString()
Returns the concatenated text of all text content elements.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |