Class ContentGroup
A grouping element in a content stream (spec §8.11). Allows drawing operations to be grouped together for transformation, clipping, or logical organization. This is distinct from Optional Content Groups (layers) — a content group is a structural grouping within the content stream, not a visibility layer.
Inherited Members
Namespace: DRIT.Pdf.Content
Assembly: DRIT.Pdf.dll
Syntax
public sealed class ContentGroup
Properties
ActionCount
Gets the number of drawing actions in this group.
Declaration
public int ActionCount { get; }
Property Value
| Type | Description |
|---|---|
| int |
Bounds
Gets the bounding box of this content group.
Declaration
public PdfRect Bounds { get; }
Property Value
| Type | Description |
|---|---|
| PdfRect |
Transform
Gets the transform matrix applied to all elements in this group.
Declaration
public PdfMatrix? Transform { get; set; }
Property Value
| Type | Description |
|---|---|
| PdfMatrix |
Methods
DrawImage(PdfImage, PdfPoint)
Draw an image into this group at the given point.
Declaration
public void DrawImage(PdfImage image, PdfPoint point)
Parameters
| Type | Name | Description |
|---|---|---|
| PdfImage | image | |
| PdfPoint | point |
DrawText(FormattedText, PdfPoint)
Draw formatted text into this group at the given point.
Declaration
public void DrawText(FormattedText text, PdfPoint point)
Parameters
| Type | Name | Description |
|---|---|---|
| FormattedText | text | |
| PdfPoint | point |
GetText()
Gets the concatenated text from all text-drawing operations in this group.
Declaration
public string GetText()
Returns
| Type | Description |
|---|---|
| string |
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A string that represents the current object. |