Moving pages within a Document

What is the most efficient means of moving pages within a document?

For example assume a document has 8 pages. I have a UI control that enables a user to select multiple pages (say pages 3, 4 and 5) and they can then move all of these pages up or down in the page order.

I know I can do this using PagePushFront and PagePushBack in something like a bubble sort but is there a better way?


Probably the simplest apprach it to remove the page from a document's
page sequence (using doc.PageRemove() - this will not destroy the page
untill the last reference to it is lost or the document is not saved)
then insert in to another location using pdfdoc.PageInsert(pos, page).