Hi @profputr,
The page/pages you are going to extract, will those pages always be at a particular page number?
Action Wizard + JavaScript (extract one page per file)
What it does: For every PDF you run the Action on, it extracts a single page (you choose which: first, last, or a specific number) and saves a new 1‑page PDF next to the original file.
How to set up
- Open Tools → Action Wizard → New Action…
- Under More Tools, add Execute JavaScript.
- (Optional) Add a Save step at the end if you prefer to suppress prompts.
- Set Files to be processed to “Ask When Action Is Started” so you can select a folder.
- Paste one of the scripts below.
// Extract a specific page (e.g., page 1) from each input PDF
// Run inside Action Wizard (batch context)
(function () {
// Page to extract (0-based index). 0 = first page.
var targetPage = 0;
// Skip if the doc doesn't have that many pages
if (this.numPages <= targetPage) {
console.println("Skip (too few pages): " + this.path);
return;
}
// Build output path next to the source (filename_p{N}.pdf)
var srcPath = this.path;
var dot = srcPath.lastIndexOf(".");
var base = (dot > 0) ? srcPath.substring(0, dot) : srcPath;
var outPath = base + "_p" + (targetPage + 1) + ".pdf";
// Extract just that page
this.extractPages({
nStart: targetPage,
nEnd: targetPage,
cPath: outPath
});
console.println("Extracted page " + (targetPage + 1) + " → " + outPath);
})();
You can adjust the script accordingly to extract the page number you want.
// Extract the first page (index 0) from each input PDF
(function () {
if (this.numPages < 1) return;
var srcPath = this.path;
var dot = srcPath.lastIndexOf(".");
var base = (dot > 0) ? srcPath.substring(0, dot) : srcPath;
var outPath = base + "_p1.pdf";
this.extractPages({
nStart: 0,
nEnd: 0,
cPath: outPath
});
console.println("Extracted first page → " + outPath);
})();
Best regards,
Tariq | Adobe Community Team