PdfContentElementCollection.AllEnumerable Struct
Represents all PdfContentElements underneath the PdfContentElementCollection.
public readonly struct AllEnumerable : IEnumerable<PdfContentElement>, IEnumerable
Public Structure AllEnumerable
Implements IEnumerable(Of PdfContentElement), IEnumerable
Properties
FlattenForms
Gets or sets the default value of the parameter flattenForms from method overloads All(Boolean) and All(PdfMatrix, Boolean) when using method overloads All() or All(PdfMatrix).
Default value is false to maintain backward-compatible behavior (old behavior).
Set this property to true to also get all PdfContentElements underneath PdfFormContent elements, recursively, (new behavior) while continuing to use existing method overloads All() or All(PdfMatrix).
Property Value
- System.Boolean
The default value of the parameter flattenForms from method overloads All(Boolean) and All(PdfMatrix, Boolean) when using method overloads All() or All(PdfMatrix).
Methods
GetEnumerator()
Returns an enumerator that iterates through all PdfContentElements underneath the PdfContentElementCollection.
public readonly PdfContentElementCollection.AllEnumerator GetEnumerator()
Public Function GetEnumerator As PdfContentElementCollection.AllEnumerator
Returns
Remove(Func<PdfContentElement, PdfMatrix, Boolean>, Boolean)
Removes all the PdfContentElements that match the conditions defined by the specified predicate. The transformation from the new (transformed) coordinate system to the default (untransformed) coordinate system is used in the logic of the predicate function.
public readonly int Remove(Func<PdfContentElement, PdfMatrix, bool> predicate, bool removeEmptyGroups = true)
Public Function Remove(predicate As Func(Of PdfContentElement, PdfMatrix, Boolean), removeEmptyGroups As Boolean = True) As Integer
Parameters
predicate
- System.Func<PdfContentElement, PdfMatrix, System.Boolean>
A function that defines the conditions of the PdfContentElements to remove; the second parameter of the function represents the transformation from the new (transformed) coordinate system to the default (untransformed) coordinate system.
removeEmptyGroups
- System.Boolean
If set to true, removes emptied PdfContentGroups and PdfFormContents.
Returns
- System.Int32
The number of elements removed.
Exceptions
- System.ArgumentNullException
predicate
is null.
Remove(Func<PdfContentElement, Boolean>, Boolean)
Removes all the PdfContentElements that match the conditions defined by the specified predicate.
public readonly int Remove(Func<PdfContentElement, bool> predicate, bool removeEmptyGroups = true)
Public Function Remove(predicate As Func(Of PdfContentElement, Boolean), removeEmptyGroups As Boolean = True) As Integer
Parameters
predicate
- System.Func<PdfContentElement, System.Boolean>
A function that defines the conditions of the PdfContentElements to remove.
removeEmptyGroups
- System.Boolean
If set to true, removes emptied PdfContentGroups and PdfFormContents.
Returns
- System.Int32
The number of elements removed.
Exceptions
- System.ArgumentNullException
predicate
is null.