Table of Contents

Class PdfLoadedPageCollection

Namespace
Syncfusion.Pdf.Parsing
Assembly
Syncfusion.Pdf.Portable.dll

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

public class PdfLoadedPageCollection : IEnumerable
Inheritance
PdfLoadedPageCollection
Implements
Inherited Members

Properties

Count

Gets the number of pages presnt in the document

public int Count { get; }

Property Value

int

this[int]

Gets the PdfPageBase at the specified index.

public PdfPageBase this[int index] { get; }

Parameters

index int

Property Value

PdfPageBase

SectionCount

Gets the number of sections present in the document

public int SectionCount { get; }

Property Value

int

Methods

Add()

Creates a new page and adds it to the collection.

public PdfPageBase Add()

Returns

PdfPageBase

The created page.

Add(SizeF)

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

public PdfPageBase Add(SizeF size)

Parameters

size SizeF

The size of the new page.

Returns

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.

public PdfPageBase Add(SizeF size, PdfMargins margins)

Parameters

size SizeF

The size of the new page.

margins PdfMargins

The margins of the new page.

Returns

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.

public PdfPageBase Add(SizeF size, PdfMargins margins, PdfPageRotateAngle rotation)

Parameters

size SizeF

The size of the new page.

margins PdfMargins

The margins of the new page.

rotation PdfPageRotateAngle

The rotation of the new page.

Returns

PdfPageBase

The created page.

GetEnumerator()

Returns an enumerator that iterates through a collection.

public IEnumerator GetEnumerator()

Returns

IEnumerator

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

Insert(int)

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

public PdfPageBase Insert(int index)

Parameters

index int

The index.

Returns

PdfPageBase

The created page.

Insert(int, SizeF)

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

public PdfPageBase Insert(int index, SizeF size)

Parameters

index int

The index.

size SizeF

The size of the page.

Returns

PdfPageBase

The created page.

Insert(int, SizeF, PdfMargins)

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

public PdfPageBase Insert(int index, SizeF size, PdfMargins margins)

Parameters

index int

The index.

size SizeF

The size of the page.

margins PdfMargins

The margins of the page.

Returns

PdfPageBase

The created page.

Insert(int, SizeF, PdfMargins, PdfPageRotateAngle)

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

public PdfPageBase Insert(int index, SizeF size, PdfMargins margins, PdfPageRotateAngle rotation)

Parameters

index int

The index.

size SizeF

The size of the page.

margins PdfMargins

The margins of the page.

rotation PdfPageRotateAngle

The rotation of the new page.

Returns

PdfPageBase

The created page.

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

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

public PdfPageBase Insert(int index, SizeF size, PdfMargins margins, PdfPageRotateAngle rotation, PdfPageOrientation orientation)

Parameters

index int

The index.

size SizeF

The size of the page.

margins PdfMargins

The margins of the page.

rotation PdfPageRotateAngle

The rotation of the new page.

orientation PdfPageOrientation

The orientation of the new page.

Returns

PdfPageBase

The created page.

Insert(int, PdfPageBase)

Inserts loaded page into loaded document at specified index

public void Insert(int index, PdfPageBase loadedPage)

Parameters

index int

The index at which page to be inserted.

loadedPage PdfPageBase

The page to be inserted.

ReArrange(int[])

Re arrange the Pages in the Loaded Document.

public void ReArrange(int[] orderArray)

Parameters

orderArray int[]

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.

public void Remove(PdfPageBase page)

Parameters

page PdfPageBase

The page to be remove.

RemoveAt(int)

Removes the page at the given specified index.

public void RemoveAt(int index)

Parameters

index int

Index of the page.