Copy link to clipboard
Copied
Dear experts
I have thousands of pdf files and I want to save onlt the 2 pages of each file and export the shortened file to excel.
I use this java script
this.extractPages(0.1);
It cuts by files but creates a .tmp file with the 2 pages.
I am trying to add the save app from Save and Export, but it does not execute both commands together (the java script and the export).
What should I do??
Thank you, Giora
Copy link to clipboard
Copied
Are you doing it as a part of an Action?
If so, you can instead delete pages 3-last page, then export the file (this can also be done with a script), then close the original without saving it. The basic code for it would be something like this:
this.deletePage(2, this.numPages-1);
this.saveAs(this.path.replace(".pdf", ".xlsx"), "com.adobe.acrobat.xlsx");
Copy link to clipboard
Copied
Use following code:
if (this.numPages > 2) {
this.deletePages({nStart: 2, nEnd: this.numPages-1});
this.dirty = false;
}
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more