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

    Show / Hide Table of Contents

    PdfFilterCollection Class

    Namespace:
    GemBox.Pdf.Filters
    Assembly:
    GemBox.Pdf.dll

    Represents a collection of PdfFilters.

    • C#
    • VB.NET
    [ComVisible(false)]
    public abstract class PdfFilterCollection : IList<PdfFilter>, ICollection<PdfFilter>, IEnumerable<PdfFilter>, IEnumerable
    <ComVisible(False)>
        Implements IList(Of PdfFilter), ICollection(Of PdfFilter), IEnumerable(Of PdfFilter), IEnumerable
    Inheritance:
    System.Object
    PdfFilterCollection
    Implements
    System.Collections.Generic.IList<PdfFilter>
    System.Collections.Generic.ICollection<PdfFilter>
    System.Collections.Generic.IEnumerable<PdfFilter>
    System.Collections.IEnumerable

    Properties

    Count

    Gets the number of PdfFilters contained in the PdfFilterCollection.

    • C#
    • VB.NET
    public int Count { get; }
    Public ReadOnly Property Count As Integer
    Property Value
    System.Int32

    The number of PdfFilters contained in the PdfFilterCollection.

    Item[Int32]

    Gets or sets the PdfFilter at the specified index.

    • C#
    • VB.NET
    public PdfFilter this[int index] { get; set; }
    Public Property Item(index As Integer) As PdfFilter
    Parameters
    index
    System.Int32

    The zero-based index of the PdfFilter to get or set.

    Property Value
    PdfFilter

    The PdfFilter at the specified index.

    Exceptions
    System.ArgumentOutOfRangeException

    index is less than 0 or index is equal to or greater than Count.

    System.ArgumentNullException

    value is null.

    Methods

    Add(PdfFilter)

    Adds a PdfFilter to the end of the PdfFilterCollection.

    • C#
    • VB.NET
    public void Add(PdfFilter filter)
    Public Sub Add(filter As PdfFilter)
    Parameters
    filter
    PdfFilter

    The PdfFilter to be added to the end of the PdfFilterCollection.

    Exceptions
    System.ArgumentNullException

    filter is null.

    AddFilter(PdfFilterType)

    Adds a new filter of the specified type to the end of the PdfFilterCollection.

    • C#
    • VB.NET
    public PdfFilter AddFilter(PdfFilterType filterType)
    Public Function AddFilter(filterType As PdfFilterType) As PdfFilter
    Parameters
    filterType
    PdfFilterType

    Type of a new filter to be added to the end of the PdfFilterCollection.

    Returns
    PdfFilter

    A new filter of the specified type added to the end of the PdfFilterCollection.

    Remarks

    Unknown is not supported by this method.

    AddFilter<TPdfFilter>()

    Adds a new filter of the specified type to the end of the PdfFilterCollection.

    • C#
    • VB.NET
    public TPdfFilter AddFilter<TPdfFilter>()
        where TPdfFilter : PdfFilter
    Public Function AddFilter(Of TPdfFilter As PdfFilter) As TPdfFilter
    Returns
    TPdfFilter

    A new filter of the specified type added to the end of the PdfFilterCollection.

    Type Parameters
    TPdfFilter

    Type of a new filter to be added to the end of the PdfFilterCollection.

    Remarks

    PdfUnknownFilter is not supported by this method.

    Clear()

    Removes all PdfFilters from the PdfFilterCollection.

    • C#
    • VB.NET
    public void Clear()
    Public Sub Clear

    Contains(PdfFilter)

    Determines whether a PdfFilter is in the PdfFilterCollection.

    • C#
    • VB.NET
    public bool Contains(PdfFilter filter)
    Public Function Contains(filter As PdfFilter) As Boolean
    Parameters
    filter
    PdfFilter

    The PdfFilter to locate in the PdfFilterCollection.

    Returns
    System.Boolean

    true if filter is found in the PdfFilterCollection; otherwise, false.

    CopyTo(PdfFilter[], Int32)

    Copies the entire PdfFilterCollection to a compatible one-dimensional array, starting at the specified index of the target array.

    • C#
    • VB.NET
    public void CopyTo(PdfFilter[] array, int arrayIndex)
    Public Sub CopyTo(array As PdfFilter(), arrayIndex As Integer)
    Parameters
    array
    PdfFilter[]

    The one-dimensional System.Array that is the destination of the PdfFilters copied from PdfFilterCollection. The System.Array must have zero-based indexing.

    arrayIndex
    System.Int32

    The zero-based index in array at which copying begins.

    Exceptions
    System.ArgumentNullException

    array is null.

    System.ArgumentOutOfRangeException

    arrayIndex is less than 0.

    System.ArgumentException

    The number of PdfFilters in the source PdfFilterCollection is greater than the available space from arrayIndex to the end of the destination array.

    GetEnumerator()

    Returns an enumerator that iterates through the PdfFilterCollection.

    • C#
    • VB.NET
    public PdfFilterCollection.Enumerator GetEnumerator()
    Public Function GetEnumerator As PdfFilterCollection.Enumerator
    Returns
    PdfFilterCollection.Enumerator

    A PdfFilterCollection.Enumerator for the PdfFilterCollection.

    IndexOf(PdfFilter)

    Searches for the specified PdfFilter and returns the zero-based index of the first occurrence within the entire PdfFilterCollection.

    • C#
    • VB.NET
    public int IndexOf(PdfFilter filter)
    Public Function IndexOf(filter As PdfFilter) As Integer
    Parameters
    filter
    PdfFilter

    The PdfFilter to locate in the PdfFilterCollection.

    Returns
    System.Int32

    The zero-based index of the first occurrence of filter within the entire PdfFilterCollection, if found; otherwise, –1.

    Insert(Int32, PdfFilter)

    Inserts a PdfFilter into the PdfFilterCollection at the specified index.

    • C#
    • VB.NET
    public void Insert(int index, PdfFilter filter)
    Public Sub Insert(index As Integer, filter As PdfFilter)
    Parameters
    index
    System.Int32

    The zero-based index at which filter should be inserted.

    filter
    PdfFilter

    The PdfFilter to insert.

    Exceptions
    System.ArgumentOutOfRangeException

    index is less than 0 or index is greater than Count.

    System.ArgumentNullException

    filter is null.

    Remove(PdfFilter)

    Removes the first occurrence of a specific PdfFilter from the PdfFilterCollection.

    • C#
    • VB.NET
    public bool Remove(PdfFilter filter)
    Public Function Remove(filter As PdfFilter) As Boolean
    Parameters
    filter
    PdfFilter

    The PdfFilter to remove from the PdfFilterCollection.

    Returns
    System.Boolean

    true if filter is successfully removed; otherwise, false. This method also returns false if filter was not found in the PdfFilterCollection.

    RemoveAt(Int32)

    Removes the PdfFilter at the specified index of the PdfFilterCollection.

    • C#
    • VB.NET
    public void RemoveAt(int index)
    Public Sub RemoveAt(index As Integer)
    Parameters
    index
    System.Int32

    The zero-based index of the PdfFilter to remove.

    Exceptions
    System.ArgumentOutOfRangeException

    index

    System.ArgumentOutOfRangeException

    index is less than 0 or index is equal to or greater than Count.

    Implements

    System.Collections.Generic.IList<T>
    System.Collections.Generic.ICollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable

    Examples

    Content Stream example

    See Also

    PDF Specification ISO 32000-1:2008, section '7.4 Filters'
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.