These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Can I control combining files with JavaScript?

StevenD
Registered: Oct 6 2006
Posts: 368
Answered

Is it possible to combine multiple PDF files into one PDF file?

StevenD

My Product Information:
Acrobat Pro Extended 9.0, Windows
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
Sure you can, check out the doc.insertPages method.

George
StevenD
Registered: Oct 6 2006
Posts: 368
Thanks for response George. I wonder if I would be able to run a batch by counting the number of files in a folder and useing this insertPages method put them all together.

StevenD

George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
You can't do all of that with a single batch sequence. You could run one batch sequence to collect the information (e.g. file names), store it in a global variable, and run some code that loops through the files and adds them to the initial file.

When you run a batch sequence, you cannot control the order that the files are opened, so you would have to figure out some way to order the files, assuming the order is important.

George
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Sure you can, and you don't need to count the number of files. You make a batch sequence that runs over all files in a folder and inserts their pages to the end of a pre-existing file.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

StevenD
Registered: Oct 6 2006
Posts: 368
Yes order is important. I was hoping that if the file names are in alpha/numeric order that could be inserted in order.

Thanks for the input. Now I just need to figure out how to do it.

StevenD