menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfLoadedPageCollection - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class PdfLoadedPageCollection

    The class provides methods and properties to handle the collections of loaded PDF pages

    Inheritance
    System.Object
    PdfLoadedPageCollection
    Implements
    System.Collections.IEnumerable
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.Pdf.Parsing
    Assembly: Syncfusion.Pdf.Base.dll
    Syntax
    public class PdfLoadedPageCollection : IEnumerable

    Properties

    Count

    Gets the number of pages presnt in the document

    Declaration
    public int Count { get; }
    Property Value
    Type
    System.Int32

    Item[Int32]

    Gets the PdfPageBase at the specified index.

    Declaration
    public PdfPageBase this[int index] { get; }
    Parameters
    Type Name Description
    System.Int32 index
    Property Value
    Type
    PdfPageBase

    SectionCount

    Gets the number of sections present in the document

    Declaration
    public int SectionCount { get; }
    Property Value
    Type
    System.Int32

    Methods

    Add()

    Creates a new page and adds it to the collection.

    Declaration
    public PdfPageBase Add()
    Returns
    Type Description
    PdfPageBase

    The created page.

    Add(SizeF)

    Creates a new page of the specified size and adds it to the collection.

    Declaration
    public PdfPageBase Add(SizeF size)
    Parameters
    Type Name Description
    System.Drawing.SizeF size

    The size of the new page.

    Returns
    Type Description
    PdfPageBase

    The created page.

    Add(SizeF, PdfMargins)

    Creates a new page of the specified size and with the specified margins and adds it to the collection.

    Declaration
    public PdfPageBase Add(SizeF size, PdfMargins margins)
    Parameters
    Type Name Description
    System.Drawing.SizeF size

    The size of the new page.

    PdfMargins margins

    The margins of the new page.

    Returns
    Type Description
    PdfPageBase

    The created page.

    Add(SizeF, PdfMargins, PdfPageRotateAngle)

    Creates a new page of the specified size and with the specified margins and adds it to the collection.

    Declaration
    public PdfPageBase Add(SizeF size, PdfMargins margins, PdfPageRotateAngle rotation)
    Parameters
    Type Name Description
    System.Drawing.SizeF size

    The size of the new page.

    PdfMargins margins

    The margins of the new page.

    PdfPageRotateAngle rotation

    The rotation of the new page.

    Returns
    Type Description
    PdfPageBase

    The created page.

    GetEnumerator()

    Returns an enumerator that iterates through a collection.

    Declaration
    public IEnumerator GetEnumerator()
    Returns
    Type Description
    System.Collections.IEnumerator

    An System.Collections.IEnumerator object that can be used to iterate through the collection.

    Insert(Int32)

    Creates a new page and inserts it at the specified index.

    Declaration
    public PdfPageBase Insert(int index)
    Parameters
    Type Name Description
    System.Int32 index

    The index.

    Returns
    Type Description
    PdfPageBase

    The created page.

    Insert(Int32, PdfPageBase)

    Inserts loaded page into loaded document at specified index

    Declaration
    public void Insert(int index, PdfPageBase loadedPage)
    Parameters
    Type Name Description
    System.Int32 index

    The index at which page to be inserted.

    PdfPageBase loadedPage

    The page to be inserted.

    Insert(Int32, SizeF)

    Creates a new page and inserts it at the specified index with specified size.

    Declaration
    public PdfPageBase Insert(int index, SizeF size)
    Parameters
    Type Name Description
    System.Int32 index

    The index.

    System.Drawing.SizeF size

    The size of the page.

    Returns
    Type Description
    PdfPageBase

    The created page.

    Insert(Int32, SizeF, PdfMargins)

    Creates a new page and inserts it at the specified index with specified size and margins.

    Declaration
    public PdfPageBase Insert(int index, SizeF size, PdfMargins margins)
    Parameters
    Type Name Description
    System.Int32 index

    The index.

    System.Drawing.SizeF size

    The size of the page.

    PdfMargins margins

    The margins of the page.

    Returns
    Type Description
    PdfPageBase

    The created page.

    Insert(Int32, SizeF, PdfMargins, PdfPageRotateAngle)

    Creates a new page and inserts it at the specified index with specified size, margins and rotation angle

    Declaration
    public PdfPageBase Insert(int index, SizeF size, PdfMargins margins, PdfPageRotateAngle rotation)
    Parameters
    Type Name Description
    System.Int32 index

    The index.

    System.Drawing.SizeF size

    The size of the page.

    PdfMargins margins

    The margins of the page.

    PdfPageRotateAngle rotation

    The rotation of the new page.

    Returns
    Type Description
    PdfPageBase

    The created page.

    Insert(Int32, SizeF, PdfMargins, PdfPageRotateAngle, PdfPageOrientation)

    Creates a new page and inserts it at the specified index with specified size,margins,rotation angle and orientation

    Declaration
    public PdfPageBase Insert(int index, SizeF size, PdfMargins margins, PdfPageRotateAngle rotation, PdfPageOrientation orientation)
    Parameters
    Type Name Description
    System.Int32 index

    The index.

    System.Drawing.SizeF size

    The size of the page.

    PdfMargins margins

    The margins of the page.

    PdfPageRotateAngle rotation

    The rotation of the new page.

    PdfPageOrientation orientation

    The orientation of the new page.

    Returns
    Type Description
    PdfPageBase

    The created page.

    ReArrange(Int32[])

    Re arrange the Pages in the Loaded Document.

    Declaration
    public void ReArrange(int[] orderArray)
    Parameters
    Type Name Description
    System.Int32[] orderArray

    The page sequence to arrange the pages.

    Examples
    //Load the PDF document
    PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Input.pdf");
    //Rearrange the page by index
    loadedDocument.Pages.ReArrange(new int[] {1, 0});
    //Save and close the document
    loadedDocument.Save("Output.pdf");
    loadedDocument.Close(true);
    'Load the PDF document
    Dim loadedDocument As New PdfLoadedDocument("Input.pdf")
    'Rearrange the page by index
    loadedDocument.Pages.ReArrange(New Integer() {1, 0})
    'Save and close the document
    loadedDocument.Save("Output.pdf")
    loadedDocument.Close(True)

    Remove(PdfPageBase)

    Removes the specified page.

    Declaration
    public void Remove(PdfPageBase page)
    Parameters
    Type Name Description
    PdfPageBase page

    The page to be remove.

    RemoveAt(Int32)

    Removes the page at the given specified index.

    Declaration
    public void RemoveAt(int index)
    Parameters
    Type Name Description
    System.Int32 index

    Index of the page.

    Implements

    System.Collections.IEnumerable

    Extension Methods

    EnumerableExtensions.GetElementType(IEnumerable)
    EnumerableExtensions.GetItemPropertyInfo(IEnumerable)
    FunctionalExtensions.ForEach<T>(IEnumerable, Action<T>)
    FunctionalExtensions.ToList<T>(IEnumerable)
    QueryableExtensions.OfQueryable(IEnumerable)
    QueryableExtensions.OfQueryable(IEnumerable, Type)
    QueryableExtensions.GroupByMany<TElement>(IEnumerable, Type, List<Func<TElement, Object>>)
    QueryableExtensions.GroupByMany(IEnumerable, Type, Func<String, Expression>, String[])
    QueryableExtensions.GroupByMany(IEnumerable, Type, List<SortDescriptor>, Dictionary<String, IComparer<Object>>, Func<String, Expression>, String[])
    QueryableExtensions.GroupByMany(IEnumerable, Type, List<SortDescriptor>, Func<String, Expression>, String[])
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved