Thanks in advance for your prompt reply.
Copy link to clipboard
Combining PDF documents
You can customize and automate the process of combining PDF documents.
If you would like to combine multiple PDF files into a single PDF document, you can do so through a series
of calls to the Doc object’s insertPages method.
Example: Creating a new document from two other documents
// Create a new PDF document:
var newDoc = app.newDoc();
// Insert doc1.pdf:
// Insert doc2.pdf:
// Save the new document:
// Close the new document without notifying the user:
What console messages do you get? Please copy and paste them.
And how do you try to run the code (e.g. console, batch, mouse up event, privileged function...)?
As indicated, it is not possible to read the content of a folder, but if all your files are in a same forder, you can copy then paste all the file names in a text field then use it to recover the names.
With macOS it very easy to do that, but I beleive it's a bit more complicated with a Windows OS.
I already did that, so let me know if you are interested with this solution and I'll send you an example file.
P.S. Sorry, I didn't place my answer at the right place...
Yes, I am interested in how you do this? I should be able to easly create a file that includes a list of the filenames I want to process easily. Can you post your answer below this reply or e-mail your solution to me?
All your files must be in the same directory.
Place the "Combine Files_BB.pdf" attached file in this directory then open it.
You paste the list of files in the left field then 2 solutions:
Either you copy the script of the right field then paste it in the console (then select all and "Enter") or you import the action wizard included in this file then run it.
You will get a combined file including all (correct) files indicated. If it's possible, sort the files before run the script because the files are imported in the indicated order.
Let me know if that suits you.
Apologies for the delay just wanted to inform you that the solution you provided worked! In fact, quite well and was a lot quicker than I anticipated. The only difference I noticed is the original byte count 7.93mb (8,118kb) .vs. converted 94.7mb (96,970kb). I wonder if this has anything to do with the Adobe PDF versions 1.4 .vs. 1.6.?
Thanks for sharing this Adobe SEQ. It will save me quite a bit of time.
There is effectively a difference of weight between saving your file following the pdf version, but I don't think from 8 to 95MB! But I am not a specialist about that...
How many files did you merge? and what was the weight of each file?
Try opening the file in Acrobat and saving it under a new name using the Save As method. This will force an optimization of it and can dramatically reduce the file size.
this is really great I have one more request ... could you please add bookmarking field too?
What happens when you use it? From where are you running it?
Before you spend more time on this you should know that this is only possible if you know the paths to all of the files that you want to merge. Acrobat JS can't read a folder's contents and merge all the files in it on its own, if that's your intention.
Yes, I can create a list of the files that I want to merge and yes all files are in the same directory.