I recently updated “Joel’s PDF Portfolio Utilities” to include the ability to combine multiple portfolios into one.
Combine All Open PDF Portfolios:
This script will look at all of the open PDF files to see which are PDF Portfolios meaning the collection object returns a value. Then, it will combine all the open PDF Portfolios into a single new PDF Portfolio that contains all the files and metadata from the sources. This version will not maintain folder structure so it’s best to use on PDF Portfolios that do not contain folders. Creating a new PDF Portfolio through app.newCollection() is a privileged function so you’ll need to wrap it in a trustedFunction to make it work, the code snippet below shows how.
trustedNewCollection = app.trustedFunction (
app.beginPriv(); // Explicitly raise the privilege
var d = app.newCollection();
newPortfolio = trustedNewCollection();
Go to the original post to read about the rest of the functions and download the example script.