Namespace: PdfSharp.Pdf
Represents the pages of the document.
public sealed class PdfPages : PdfDictionary, System.ICloneable, System.Collections.Generic.IEnumerable`1[[System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[PdfSharp.Pdf.PdfItem, PdfSharp, Version=0.1.3.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Collections.IEnumerable, System.Collections.Generic.IEnumerable`1[[PdfSharp.Pdf.PdfPage, PdfSharp, Version=0.1.3.0, Culture=neutral, PublicKeyToken=null]]
Inheritance Object → PdfItem → PdfObject → PdfDictionary → PdfPages
Implements ICloneable, IEnumerable<KeyValuePair<String, PdfItem>>, IEnumerable, IEnumerable<PdfPage>
Gets the number of pages.
public int Count { get; }
public PdfPage Item { get; }
Gets a PdfArray containing all pages of this document. The array must not be modified.
public PdfArray PagesArray { get; }
Gets the dictionary containing the elements of this dictionary.
public DictionaryElements Elements { get; }
Gets or sets the PDF stream belonging to this dictionary. Returns null if the dictionary has no stream. To create the stream, call the CreateStream function.
public PdfStream Stream { get; set; }
Gets the PdfDocument this object belongs to.
public PdfDocument Owner { get; }
Indicates whether the object is an indirect object.
public bool IsIndirect { get; }
Gets the PdfInternals object of this document, that grants access to some internal structures which are not part of the public interface of PdfDocument.
public PdfObjectInternals Internals { get; }
Gets the indirect reference of this object. If the value is null, this object is a direct object.
public PdfReference Reference { get; internal set; }
Gets the indirect reference of this object. Throws if it is null.
public PdfReference ReferenceNotNull { get; }
InvalidOperationException
The indirect reference must be not null here.
Finds a page by its id. Transforms it to PdfPage if necessary.
internal PdfPage FindPage(PdfObjectID id)
id
PdfObjectID
Creates a new PdfPage, adds it to the end of this document, and returns it.
public PdfPage Add()
Adds the specified PdfPage to the end of this document and maybe returns a new PdfPage object. The value returned is a new object if the added page comes from a foreign document.
public PdfPage Add(PdfPage page)
page
PdfPage
Creates a new PdfPage, inserts it at the specified position into this document, and returns it.
public PdfPage Insert(int index)
index
Int32
Inserts the specified PdfPage at the specified position to this document and maybe returns a new PdfPage object. The value returned is a new object if the inserted page comes from a foreign document.
public PdfPage Insert(int index, PdfPage page)
index
Int32
page
PdfPage
Inserts pages of the specified document into this document.
public void InsertRange(int index, PdfDocument document, int startIndex, int pageCount)
index
Int32
The index in this document where to insert the page .
document
PdfDocument
The document to be inserted.
startIndex
Int32
The index of the first page to be inserted.
pageCount
Int32
The number of pages to be inserted.
Inserts all pages of the specified document into this document.
public void InsertRange(int index, PdfDocument document)
index
Int32
The index in this document where to insert the page .
document
PdfDocument
The document to be inserted.
Inserts all pages of the specified document into this document.
public void InsertRange(int index, PdfDocument document, int startIndex)
index
Int32
The index in this document where to insert the page .
document
PdfDocument
The document to be inserted.
startIndex
Int32
The index of the first page to be inserted.
Removes the specified page from the document.
public void Remove(PdfPage page)
page
PdfPage
Removes the specified page from the document.
public void RemoveAt(int index)
index
Int32
Moves a page within the page sequence.
public void MovePage(int oldIndex, int newIndex)
oldIndex
Int32
The page index before this operation.
newIndex
Int32
The page index after this operation.
Replaces the page tree by a flat array of indirect references to the pages objects.
internal void FlattenPageTree()
Prepares the document for saving.
internal void PrepareForSave()
Gets the enumerator.
public IEnumerator<PdfPage> GetEnumerator()