Method MoveRange
- Namespace
- BitMiracle.Docotic.Pdf
- Assembly
- BitMiracle.Docotic.Pdf.dll
MoveRange(int, int, int)
Changes the position of a contiguous range of pages within the collection of document pages.
public void MoveRange(int startIndex, int count, int toIndex)
Parameters
startIndexintThe zero-based index of the first page in the range to move.
countintThe number of pages in the range to move.
toIndexintThe zero-based index to move the range to.
Remarks
The specified range of pages is inserted before the page at the position specified by
toIndex. After insertion, the collection is compacted by shifting
pages toward the beginning of the collection.
If toIndex equals Count, the range is moved to the end
of the collection.
See the Prepend PDF section for examples of reordering pages in a PDF document.
Exceptions
- ArgumentOutOfRangeException
Thrown when
startIndexis outside the bounds of the collection, whencountis less than or equal to0, or whenstartIndex+countexceeds the number of pages in the document. Also thrown whentoIndexis less than0or greater than Count.