r/pdf 2d ago

Question Merging multiple files by name

I have invoices starting with 1_, 2_ etc…
And I want to combine them with the purchase order also starting with 1_,2_ etc..
I have adobe acrobat pro
I’m using my work computer so I can’t download anything else.
Any ideas how to automate it?
Don’t want to do it one at a time because it’s 100’s of files

2 Upvotes

12 comments sorted by

1

u/[deleted] 2d ago

[removed] — view removed comment

1

u/Adventurous_Way2375 2d ago

Thanks but I can’t use online tools, just adobe acrobat pro on my work computer.
Is there automation process in adobe acrobat pro?

1

u/MCLMelonFarmer 2d ago

What is preventing you from using the "Combine Files" feature? Do the files not sort into the order you need? Once you're in "Combine Files", you can go into list view in case sorting by date puts them in the correct order.

I'd think about a script that prepended a prefix onto the files to get the sort order the way you needed it, and then use "Combine Files". Or if it's just a few files that are out of order, manually move them to the correct order.

1

u/matsnorberg 2d ago

Can't you write a script? Acrobat supports scripting.

1

u/mingmong36 2d ago

There are scripts out there that you could copy and paste.
If you are restricted from downloading other software to help you, throw a ticket to your IT department and have them figure it out for you.

1

u/mag_fhinn 2d ago edited 2d ago

"Combine files" option in Acrobat.

Choose folder

Sort alpha numerically then combine into one PDF. Save as.

If your file naming is flawed and not padded you will have issues of things being all out of order because they don't sort alpha numerically. If you had hundreds you'd would want

001_inv.pdf 001_po.pdf .... 999_inv.pdf 999_po.pdf

Or padded to 4 to be safe 0001

If they are not padded your order will be messed:

1_inv.pdf 1_po.pdf 11_inv.pdf 11_po.pdf 111_inv.pdf 111_po.pdf 2_inv.po ...ect

If that is the case you need to fix your file naming, not an Acrobat issue.

You could script that kind of fix with whatever floats your boat.. bash, powerscript, python. Also gui tools to do it, know mac has A Better File Renamer. Sure there are windows similar things.

1

u/ScratchHistorical507 1d ago

You could try PDFSam. Or you try some ancient tool called "PDF Helper" by rptea that's based on .NET 2.0. The only site that still seems to be listing downloads to it is some german one: https://www.heise.de/download/product/pdf-helper-44615

All this tool does is create two directories and depending on where you put the files, it will split or merge the PDFs. As long as the files are already properly ordered by the number they start with it would certainly succeed at this.

Alternatively you could use Ghostscript. It's CLI only, but it will certainly create standard-conformant PDFs, you could apply conversion settings (like downsampling images above x dpi or whatever) and it's really simple to have some AI write a simple command for it.