GemBox.Pdf
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    PdfContentElementCollection.AllEnumerable Struct

    Namespace:
    GemBox.Pdf.Content
    Assembly:
    GemBox.Pdf.dll

    Represents all PdfContentElements underneath the PdfContentElementCollection.

    • C#
    • VB.NET
    public readonly struct AllEnumerable : IEnumerable<PdfContentElement>, IEnumerable
    Public Structure AllEnumerable
        Implements IEnumerable(Of PdfContentElement), IEnumerable
    Implements
    System.Collections.Generic.IEnumerable<PdfContentElement>
    System.Collections.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).

    • C#
    • VB.NET
    public static bool FlattenForms { get; set; }
    Public Shared Property FlattenForms As Boolean
    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.

    • C#
    • VB.NET
    public readonly PdfContentElementCollection.AllEnumerator GetEnumerator()
    Public Function GetEnumerator As PdfContentElementCollection.AllEnumerator
    Returns
    PdfContentElementCollection.AllEnumerator

    A PdfContentElementCollection.AllEnumerator for the PdfContentElementCollection.AllEnumerable.

    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.

    • C#
    • VB.NET
    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.

    • C#
    • VB.NET
    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.

    Implements

    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.