The pages of a document, in page order: the leaves of the page tree. Pages are inserted, removed and moved here.
public sealed class PdfPageCollection : IReadOnlyList<PdfPage>, IReadOnlyCollection<PdfPage>, IEnumerable<PdfPage>, IEnumerable
ISO 32000-2 §7.7.3. The page tree is walked on first use (count, index or enumeration), once, by its Kids arrays; its
Count entries are only checked, never trusted (§7.7.3.2 calls them redundant). Each PdfPage is a live view over
its page object, but the list itself is the tree's shape at the first walk or the last edit made here: a change made to the page
tree through the COS layer after that is not seen.
Editing (PDF 1.0): Insert(Int32, PdfRectangle), Insert(Int32, CosReference), RemoveAt(Int32) and
Move(Int32, Int32) rebuild the page tree at once, balanced, with every page's inherited attributes (§7.7.3.4) made its own first,
so a page keeps its Resources, MediaBox, CropBox and Rotate wherever it moves; the root keeps its
object, and intermediate nodes are reused. Views of the pages stay valid across edits. Each edit is a mutation: no read may run
concurrently with it.
A linearized file opened through range requests (OpenAsync(HttpClient, Uri, CancellationToken))
finds its pages through its page offset hint table instead (ISO 32000-2 F.4.2 and Annex G, G.4; issue #208): the count is the
linearization dictionary's N, and each page's object is read when the page is first asked for, so going to a page fetches
that page and not the tree. The page tree is still read, on first use, by anything that needs it: IndexOf(PdfPage),
editing, or a page the hints do not locate (reported as LinearizationHintsInvalid; the pages then come from the tree, the
views already handed out included).
kind:method, kind:property, kind:ctor. Press Esc to clear.CountGets the number of pages.Item[Int32]Gets the page at a zero-based index.Add(CosReference)Adds an existing page object of the document, not yet in the page tree, at the end of the document.Add(PdfRectangle)Adds a new, empty page at the end of the document.IndexOf(PdfPage)Returns the index of page, or -1 when it is not a page of the document.Insert(Int32, CosReference)Inserts an existing page object of the document, not yet in the page tree, at index.Insert(Int32, PdfRectangle)Inserts a new, empty page at index.Move(Int32, Int32)Moves the page at fromIndex so that it is at toIndex.PrefetchAsync(Int32, CancellationToken)Gets the page at index once the objects reading it needs are cached: for a remote document, its page object (through the page offset hints of a linearized file, else the page tree) and then what PrefetchAsync(CancellationToken) fetches.Remove(PdfPage)Removes page from the document.RemoveAt(Int32)Removes the page at index from the document.