Copy link to clipboard
Copied
Is it possible to bulk save (as opposed to save as) an extracted page from multiple pdfs to individual PDFs in a folder automatically with an Adobe Action?
Copy link to clipboard
Copied
Yes.
Copy link to clipboard
Copied
Yes, this is possible using a script.
Which page do you want to extract? How do you want to call the new file, and where do you want to save it?
Copy link to clipboard
Copied
We got the extract based on a phrase action to work, but it opens the extracted pages as temporary files and you have to save each individual one, An easier way is to save them all in bulk in the same folder with different names so they dont overwrite any of the other pdfs.
Heres the current action we have:
<?xml version="1.0" encoding="UTF-8"?>
<Workflow xmlns="http://ns.adobe.com/acrobat/workflow/2012" title="Extract Pages With String" description="Looks for a certain string and extracts all pages that contain that string into a new PDF document. The document will be open in Acrobat when this Action is run, and needs to be saved. " majorVersion="1" minorVersion="0">
<Group label="Untitled">
<Command name="JavaScript" pauseBefore="false" promptUser="false">
<Items>
<Item name="ScriptCode" type="text" value="// Iterates over all pages and find a given string and extracts all 
// pages on which that string is found to a new file.

var pageArray = [];

var stringToSearchFor = "220.3a";

for (var p = 0; p < this.numPages; p++) {
	// iterate over all words
	for (var n = 0; n < this.getPageNumWords(p); n++) {
		if (this.getPageNthWord(p, n) == stringToSearchFor) {
			pageArray.push(p);
			break;
		}
	}
}

if (pageArray.length > 0) {
	// extract all pages that contain the string into a new document
	var d = app.newDoc(); // this will add a blank page - we need to remove that once we are done
	for (var n = 0; n < pageArray.length; n++) {
		d.insertPages( {
			nPage: d.numPages-1,
			cPath: this.path,
			nStart: pageArray[n],
			nEnd: pageArray[n],
		} );
	}

 // remove the first page
 d.deletePages(0);
 
}
"/>
<Item name="ScriptName" type="text" value=""/>
</Items>
</Command>
</Group>
</Workflow>
Find more inspiration, events, and resources on the new Adobe Community
Explore Now