Click or drag to resize

PdfContentElementCollection Class

Represents a collection of PdfContentElements.
Inheritance Hierarchy
SystemObject
  SautinSoft.Pdf.ContentPdfContentElementCollection

Namespace: SautinSoft.Pdf.Content
Assembly: SautinSoft.Pdf (in SautinSoft.Pdf.dll) Version: 2026.5.19
Syntax
public sealed class PdfContentElementCollection : ICollection, 
	IEnumerable, ICollection<PdfContentElement>, IEnumerable<PdfContentElement>

The PdfContentElementCollection type exposes the following members.

Properties
 NameDescription
Public propertyCount Gets the number of PdfContentElements contained in the PdfContentElementCollection.
Public propertyFirst Gets the first PdfContentElement of the PdfContentElementCollection.
Public propertyLast Gets the last PdfContentElement of the PdfContentElementCollection.
Top
Methods
 NameDescription
Public methodAddAfter Adds the specified PdfContentElement after the specified existing PdfContentElement in the PdfContentElementCollection.
Public methodAddBefore Adds the specified PdfContentElement before the specified existing PdfContentElement in the PdfContentElementCollection.
Public methodAddClone(PdfContentElement, PdfContentElement) Adds a clone of the specified PdfContentElement to the PdfContentElementCollection.
Public methodAddCloneTPdfContentElement(TPdfContentElement, PdfContentElement) Adds a clone of the specified TPdfContentElement to the PdfContentElementCollection.
Public methodAddFirst Adds the specified PdfContentElement at the start of the PdfContentElementCollection.
Public methodAddForm

Adds the PdfFormContent that represents a PDF content that is a self-contained description of any sequence of PdfContentElements.

Use Transform of the returned PdfFormContent to position or transform the PdfFormContent.

Public methodAddGroup

Adds the PdfContentGroup that represents a group of PDF content elements that are independent from the rest of the surrounding elements.

Use Transform of the returned PdfContentGroup to position or transform the PdfContentGroup.

Public methodAddImage

Adds the PdfImageContent that represents a PDF content that is a rectangular array of sample values, each representing a color.

Use Transform of the returned PdfImageContent to position or transform the PdfImageContent.

Tip  Tip
The preferred way to add an image is by using DrawImage(PdfImage, PdfPoint) methods.
Public methodAddLast Adds the specified PdfContentElement at the end of the PdfContentElementCollection.
Public methodAddMarkEnd

Adds the PdfContentMark that represents the end of the marked-content sequence.

This method should be preceeded by the AddMarkStart(PdfContentMarkTag, PdfContentElement) method and PdfContentMarks that these methods return limit the added marked-content sequence.

Public methodAddMarkPoint

Adds the PdfContentMark that represents single marked-content point.

Use GetEditableProperties of the returned PdfContentMark to set the marked content properties.

Public methodAddMarkStart

Adds the PdfContentMark that represents the start of the marked-content sequence.

Use GetEditableProperties of the returned PdfContentMark to set the marked content properties.

This method should be followed by the AddMarkEnd(PdfContentElement) method and PdfContentMarks that these methods return limit the added marked-content sequence.

Public methodAddPath

Adds the PdfPathContent that represents a geometrical PDF content composed of lines and curves.

Use methods BeginSubpath(PdfPoint), LineTo(PdfPoint), and BezierTo(PdfPoint, PdfPoint, PdfPoint) of the returned PdfPathContent to define the geometrical content.

Public methodAddShading Adds the PdfShadingContent that represents a PDF content that is a smooth transition between colors.
Public methodAddText

Adds the PdfTextContent that represents a textual PDF content (a sequence of glyphs from the specified font of the specified size).

Use TextTransform of the returned PdfTextContent to position or transform the PdfTextContent.

Caution note  Caution
Note that the font might not contain all the necessary information to correctly position, render and/or convert to Unicode all characters of the encodedText so use this method at your own risk.
Tip  Tip
The preferred way to add a text is by using PdfFormattedText type and DrawText(PdfFormattedText, PdfPoint) methods.
Public methodAll Gets all PdfContentElements underneath this PdfContentElementCollection.
Public methodAll(PdfMatrix) Gets all PdfContentElements underneath this PdfContentElementCollection.
Public methodClear Removes all PdfContentElements from the PdfContentElementCollection.
Public methodContains Determines whether a PdfContentElement is in the PdfContentElementCollection.
Public methodCopyTo Copies the entire PdfContentElementCollection to a compatible one-dimensional array, starting at the specified index of the target array.
Public methodGetEnumerator Returns an enumerator that iterates through the PdfContentElementCollection.
Public methodGroup

Groups the specified range of PdfContentElements into a new PdfContentGroup whose elements are independent from the rest of the surrounding elements.

All PdfContentElements between the first and the last (inclusive) of this PdfContentElementCollection are moved a new PdfContentGroup that replaces the first in this PdfContentElementCollection.

Use Transform of the returned PdfContentGroup to position or transform the PdfContentGroup.

Public methodRemove Removes the PdfContentElement from the PdfContentElementCollection.
Public methodRemoveFirst Removes the PdfContentElement at the start of the PdfContentElementCollection.
Public methodRemoveLast Removes the PdfContentElement at the end of the PdfContentElementCollection.
Top
Remarks
Collection is implemented as doubly linked list.
See Also