This sample shows how to swap pages (interchange positions of two pages) in a PDF document.
Please use PdfDocument.SwapPages method to interchange positions of two pages. This method accepts indexes of the pages that are to be swapped. If you need to change positions of a range of pages then please have a look at PdfDocument.MovePages methods. You may move one page to a new position with help of PdfDocument.MovePage method.