Copy link to clipboard
Copied
I need to insert a document containing several pages into another document after every certain amount of pages.
For example, my destination document is a 200-page document containing 100 2-page letters that I have to print out. Each letter will contain two enclosures that are in a source pdf file. Currently, I have to drag and drop the source file into the destination file behind each individual letter to get it ready for printing.
I have been trying to write a script that will do this tedious work for me, but I am so green and I'm running into so many roadblocks. If anyone out there can point me in the right direction, I would greatly appreciate it.
Copy link to clipboard
Copied
Basically, you would need to write a loop that inserts the pages into the target PDF using the insertPages command. This is a bit tricky, though, because each time you insert pages the total amount of pages in the target file changes and your code needs to take that into consideration.
If you're interested, I've developed a tool that allows you to do this task easily and without having to write any code yourself.
You can find it here: Custom-made Adobe Scripts: Acrobat -- Insert One PDF File Into Another Multiple Times
Copy link to clipboard
Copied
If you do decide to write it yourself here's a tip. When you insert or delete pages in a loop you get a headache really quick. The solution is to work backwards from the end of the file, so that all the work you've already done doesn't affect the pages still to do.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now