Copy link to clipboard
Copied
Good Forum Folk,
I wish to create a new .PDF composed of all the first pages of a large number of other .PDF's. My preferred approach would be to create an Action with the "Default option:" of "Add folder..." as its first step. At present I have the following javascript as my second step:
this.print(false,0,0,true); [which sends p. 1 of the selected .PDF as a print job to the last-used printer]
this.closeDoc(true); [which closes the selected document]
I would like to improve the script so that it only prompts to begin the process once (instead of for each .PDF included in the batch).
I look forward to your suggestions.
QD
Copy link to clipboard
Copied
You can use the extractPages command to export the first pages to a single folder, and then manually combine all the files in that folder.
You do not need to add a closeDoc command to an Action. It does that automatically.
Copy link to clipboard
Copied
One strategy is to create a PDF from first page of the first document processed, using the "doc.extractPages" function. Do not close this doc or extract it with a path. Instead, place the document object returned from extract pages into a global variable. Then for every document after that insert a page into the document.