Joel’s PDF Portfolio Utilities Updated

| No Comments

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.

 

Note: trustedFunction is available only during batch, console and in folder level JavaScripts. Because it is used to elevate the privilege level of the function, you can’t use it from inside a PDF file.

 

trustedNewCollection = app.trustedFunction (
function()
{
app.beginPriv(); // Explicitly raise the privilege
var d = app.newCollection();
app.endPriv();
return d;
}
)

 

newPortfolio = trustedNewCollection();

 

Go to the original post to read about the rest of the functions and download the example script.