ImageEn, unit iexUserInteractions




function MovePages(const PageIndex: Integer; DestIndex: Integer): Boolean; overload;
function MovePages(const Pages: array of Integer; DestIndex: Integer): Boolean; overload;


Move pages from to another position in the document.

The pages to move are specified by a PageIndex or the Pages array. If a null value is specified, the method fails.
PageIndex is used to move a single page.
Pages is an array of page indexes, e.g. [0, 2, 4, 5, 6].

DestIndex specifies the insertion position, e.g. specifying 1 will make it the second page (becomes index 1). If -1 is specified, the pages are moved to the end of the document.

Result will be true if the pages are moved.

Note: DocModified will be true after moving


Demo  Demos\Other\PdfViewer\PdfViewer.dpr


// Move pages to the start of the document
ImageEnView1.PdfViewer.MovePages( [3, 4, 8, 9], 0);

// Move the current page to the end of the document
ImageEnView1.PdfViewer.MovePages( ImageEnView1.PdfViewer.PageIndex, ImageEnView1.PdfViewer.PageCount );

See Also

- DeletePages
- ImportPages