Table of Contents

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

startIndex int

The zero-based index of the first page in the range to move.

count int

The number of pages in the range to move.

toIndex int

The 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 startIndex is outside the bounds of the collection, when count is less than or equal to 0, or when startIndex + count exceeds the number of pages in the document. Also thrown when toIndex is less than 0 or greater than Count.