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
this[int]
Gets the PdfPageBase at the specified index.
public PdfPageBase this[int index] { get; }
Parameters
index
int
Property Value
SectionCount
Gets the number of sections present in the document
public int SectionCount { get; }
Property Value
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
SizeFThe 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
SizeFThe size of the new page.
margins
PdfMarginsThe 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
SizeFThe size of the new page.
margins
PdfMarginsThe margins of the new page.
rotation
PdfPageRotateAngleThe 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
intThe 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
intThe index.
size
SizeFThe 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
intThe index.
size
SizeFThe size of the page.
margins
PdfMarginsThe 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
intThe index.
size
SizeFThe size of the page.
margins
PdfMarginsThe margins of the page.
rotation
PdfPageRotateAngleThe 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
intThe index.
size
SizeFThe size of the page.
margins
PdfMarginsThe margins of the page.
rotation
PdfPageRotateAngleThe rotation of the new page.
orientation
PdfPageOrientationThe 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
intThe index at which page to be inserted.
loadedPage
PdfPageBaseThe 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
PdfPageBaseThe page to be remove.
RemoveAt(int)
Removes the page at the given specified index.
public void RemoveAt(int index)
Parameters
index
intIndex of the page.