Class TextObjectCollection
Observable collection of text objects
Inheritance
System.Object
TextObjectCollection
Implements
IronSoftware.Abstractions.Pdf.IDocumentTextObjectCollection<
TextObject>
System.Collections.Generic.IEnumerable<
TextObject>
System.Collections.IEnumerable
System.Collections.Generic.ICollection<
TextObject>
IronSoftware.Abstractions.IJsonSerializable
Assembly: IronPdf.dll
Syntax
public class TextObjectCollection : ObservableCollection<TextObject>, IPdfTextObjectCollection
Use TextObjectCollection in IronPDF when a C# application works with Iron Software API. It represents observable collection of text objects.
TextObjectCollection matters when an application needs to configure or invoke Iron Software API from C# code. The class encapsulates the related options and behavior in a single object that is set up once and reused across render or processing calls. Typical scenarios include batch generation pipelines, templated document workflows, and integration with existing C# document services.
To use TextObjectCollection, instantiate or obtain it from the relevant entry point in the IronPDF C# API. Key properties include IsReadOnly, Items. Assign options or invoke methods on the instance to configure or perform the operation. The draw text and bitmap covers typical usage in C# end to end.
using IronPdf;
// Obtain TextObjectCollection from the relevant entry point in the IronPDF API
void Configure(TextObjectCollection instance)
{
var current = instance.IsReadOnly;
instance.Add();
}
For the broader workflow, see the extract text and images guide in the IronPDF C# documentation. For broader context, the Iron Software API portion of the IronPDF C# API contains related types that work with TextObjectCollection directly. TextObjectCollection instances inherit additional members from ObservableCollection<TextObject> that may be relevant in advanced scenarios. In application code, treat TextObjectCollection as a configured object that is constructed once and reused across operations rather than instantiated per call. Configuration is generally idempotent: assigning the same property value twice has the same effect as assigning it once. For diagnostic purposes, inspect the relevant TextObjectCollection property after each operation to confirm the configured state. See the constructors, properties, and methods tables below for the complete API surface of TextObjectCollection. Application code typically obtains or instantiates a single TextObjectCollection and shares it across multiple IronPDF operations rather than recreating it per call.
Properties
IsReadOnly
Declaration
public bool IsReadOnly { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
Items
Declaration
public IList<TextObject> Items { get; set; }
Property Value
| Type |
Description |
| System.Collections.Generic.IList<TextObject> |
|
Methods
Add(TextObject)
Declaration
public void Add(TextObject item)
Parameters
Clear()
Declaration
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type |
Description |
| System.Int32 |
|
Remove(TextObject)
Declaration
public bool Remove(TextObject item)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
RemoveAt(Int32)
Declaration
public void RemoveAt(int index)
Parameters
| Type |
Name |
Description |
| System.Int32 |
index |
|
ToJson()
Declaration
Returns
| Type |
Description |
| System.String |
|
Implements
IronSoftware.Abstractions.Pdf.IDocumentTextObjectCollection<>
System.Collections.Generic.IEnumerable<>
System.Collections.IEnumerable
System.Collections.Generic.IList<>
System.Collections.Generic.ICollection<>
IronSoftware.Abstractions.IJsonSerializable