?
Solved

Merge adobe acrobat files automatically

Posted on 2011-10-21
8
Medium Priority
?
366 Views
Last Modified: 2013-06-13
Hello Experts!

I've seen a couple of quesitons on merging PDF files but have not seen an answer that addresses my scenario (have I missed something?).

I need to automatically merge a series of pdf files into a single acrobat file in a particular sequence specifed by the boss. The sequence will change as new reports are added or old ones are removed.  

I have around 24 report files total right right now that I have to merge manually in a partcular sequence every week sometime many, many times in a week with new versions of the reports.  

Prefer if this can be done using VB Script or VBA simply because I have worked with those and know how to call or integrate from MS Access 2003 as part of a report macro or code module.  However I believe I read that the Adobe API uses Java so whatever gets the job done, I just may need a few pointers to get another language to work.

I have Acrobat Pro 9 installed on my PC.

Thanks for any help!
0
Comment
Question by:matttclark
  • 4
  • 2
  • 2
8 Comments
 
LVL 32

Expert Comment

by:Robberbaron (robr)
ID: 37010866
i would be using the pdftk commandline app http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/  because i know how to script it via commandline parameters from vba etc
0
 

Author Comment

by:matttclark
ID: 37011045
I can install that if you give me the script! thanks
0
 
LVL 46

Expert Comment

by:aikimark
ID: 37011046
Do the file names provide you with enough information to properly sequence the PDFs for the concatenation process?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:matttclark
ID: 37011132
aikimark,


not sure..how about a sample?
report/filenames

1.      Adonis SPP
2.      Adonis SPP summary
3.      HTC SPP
4.      HTC SPP Summary
5.      Belkin SPP
6.      Belkin SPP Summary
7.      Notes and Changes
8.      Cover
9.      TOC
10.      Division 1000 Summary
11.      Division 1100 Summary
12.      Division 1200 Summary
13.      FS Managers summary
14.      FS All customers
15.      FS By code

Sequence is manually set and with this sampling is 8, 9, 7, 10, 11, 12, 5, 6, 1, 2, 3, 4, …etc


thanks!
0
 
LVL 46

Accepted Solution

by:
aikimark earned 2000 total points
ID: 37012300
I'm using PDFSAM (1.1) for this test.

I created a file named MergeList.csv in my test directory with the following contents:
D:\MergeQuestion\Cover.PDF
D:\MergeQuestion\TOC.PDF
D:\MergeQuestion\Notes and Changes.PDF
D:\MergeQuestion\Division 1000 Summary.PDF
D:\MergeQuestion\Division 1100 Summary.PDF
D:\MergeQuestion\Division 1200 Summary.PDF
D:\MergeQuestion\Belkin SPP.PDF
D:\MergeQuestion\Belkin SPP Summary.PDF
D:\MergeQuestion\Adonis SPP.PDF
D:\MergeQuestion\Adonis SPP summary.PDF
D:\MergeQuestion\HTC SPP.PDF
D:\MergeQuestion\HTC SPP Summary.PDF
D:\MergeQuestion\FS Managers summary.PDF
D:\MergeQuestion\FS All customers.PDF
D:\MergeQuestion\FS By code.PDF

Open in new window


I had a single blank page PDF that I copied and renamed to the documents you listed in the order you prescribed.

I placed the following in a batch file named RunMerge.cmd
D:
cd \pdfsam\bin
run-console -l "D:\mergequestion\mergelist.csv" -o "D:\mergequestion\mergeddocument.pdf" concat
pause
exit

Open in new window


When I run the batch file, all the pages are merged into mergeddocument.pdf

Note: the pause in the batch file allows me to inspect the log for errors.
0
 

Author Comment

by:matttclark
ID: 37012605
aikimark-wow thanks for the effort.

was not familiar with PDF SAM but googled it and am reading up on.  will download and install on work PC on Monday and run through your bat file!

let me get back to you then, have a good rest of the weekend! thanks again.
0
 
LVL 32

Expert Comment

by:Robberbaron (robr)
ID: 37013416
I too was not aware of PDF-SAM.
While PDFTL will do the job, given the number of fields you wish to merge the PDF_SAM ability to read input from a CSV file is a big advantage.
And means the batchfile is independent of the input.
0
 

Author Closing Comment

by:matttclark
ID: 37035498
sorry for the delay. won't be able to get this installed on Office PC for a week or two (corporate IT), but based on everything I've read, this shoudl do the trick.

thanks again!
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
Make the most of your online learning experience.
Introduction to Processes
Screencast - Getting to Know the Pipeline

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question