I have a pdf that I complete regularly, but then need to extract two sets of pages from the file and save in the same destination with the same file name but add "Client Copy 1" and "Client Copy 2" to the file name. Can this be done using script on a button?
If this is too complicated to arrange a file name, could it simply extract the relevant pages ready for me to then 'save as' This simple automation would help if it can be done?
Copy link to clipboard
So the "doc.extractPages" function will work in Acrobat Pro from a document script, so you can run it from a button on a PDF. However, since this is only for you, you can put a folder level script on your own system that will save the extracted pages to a predetermined file name and folder path.
here's the basic button script for just extracting the pages, but not saving
This code extracts pages 2 to 4 from the document.
Hi Thom, this works perfectly, thank you. What would the code be to extract non sequential pages, is that possible?
I need pages 27 & 32 for example from a 32 page document.
No. If you want to do it like that the options are:
- Create a new document and then import those pages into it, or
- Delete all the other pages in the file.
That's a shame, thanks very much for the response, much appreciated. 🙂 Have a good weekend.