Remaps pages for reordering, copying and deletion.







Name Type Description
Pages String The ordered list of page numbers of pages to remain.




This method provides a simple method for remapping the pages in a document. It can be used for reordering, copying or deleting pages.

It accepts a list of page numbers and reorders the pages in the document so that they mach these page numbers. If a number is repeated more than once, the page is duplicated. If a number is omitted, the page is deleted.

Page numbers can be delimited using spaces, commas or semicolons. The first page in a document is page one. So to reverse a four-page document, you might use "4 3 2 1".




The following code snippet illustrates how one might reverse all the pages in a document.

Set theDoc = Server.CreateObject("ABCpdf13.Doc")
theDoc.Read "c:\mypics\sample.pdf"
theDoc.FontSize = 500
theDoc.Color = "255 0 0"
theDoc.HPos = 0.5
theDoc.VPos = 0.3
theCount = theDoc.PageCount
thePages = ""
For i = 1 To theCount
  theDoc.PageNumber = i
  theDoc.AddText i
  thePages = thePages & (theCount - i + 1) & " "
theDoc.RemapPages thePages
theDoc.Save "c:\mypdfs\docremappages.pdf"

docremappages.pdf [Page 1]

docremappages.pdf [Page 2]

docremappages.pdf [Page 3]

docremappages.pdf [Page 4]