Method AppendRange
AppendRange(int, PageRange)
Appends the selected pages of a source, in ascending page order.
public PdfPageAssembly AppendRange(int sourceIndex, PageRange pages)
Parameters
sourceIndexintThe index returned by an
AddSourcecall.pagesPageRangeThe 1-based selection, for example
PageRange.Parse("1-3,7").
Returns
- PdfPageAssembly
This instance, so appends can be chained.
Remarks
A PageRange is a sorted, disjoint set of pages, so it selects
which pages appear and never what order they appear in — "3,1" and "1,3"
are the same selection. Use Reorder(byte[], IReadOnlyList<int>, Stream, PdfAssemblyOptions?)
or repeated AppendPage(int, int) calls when the order matters.
Exceptions
- ArgumentOutOfRangeException
The index names no source.