Do you own a Debenu Quick PDF Library 12/11/10/9/8/7? Upgrade to Debenu Quick PDF Library 13!

Foxit Quick PDF Library

Frequently Asked Question:

Return to FAQ Index

How do I arrange pages after extracting them with the ExtractFilePages function?

Question

How do I arrange pages after extracting them with the ExtractFilePages function?

Answer

There isn't a parameter that can be used with the ExtractFilePages function to arrange pages after they have been extracted -- instead the extracted pages in a new document are arranged in ascending order -- but there is a relatively simple workaround for arranging pages that can be used after the pages have been extracted. The workaround is desribed here:

  1. Do multiple extractions for each page group where the page sequence is not in order to a temporary file [x]
  2. Do a complete extraction for series of page groups where they are in sequence, [x+1].
  3. Perform a merge of all temporary pages files to output file.
  4. Deletes all temporary files.

Example: Customer enters, RangeList of "2,1, 3-5, 5,6,7] with output file "outputfile.pdf"

Extract page 2 -> tempfile01.pdf | AddToMergeList "workaround"

Extract page 1 -> tempfile02.pdf | AddToMergeList "workaround"

Extract pages 3-5 -> tempfile03.pdf | AddToMergeList "workaround"

Extract page -> 7 -> tempfile04.pdf | AddToMergeList "workaround"

MergeFileList "workdaround", "outputfile.pdf"

Delete tempfile*.pdf


© 2015 Debenu & Foxit. All rights reserved. AboutBuyContactBlogNewsletterSupportFAQProduct UpdatesForum