PDF

Combine PDFs

Combines PDFs into one file: all of them, one per folder (such as an email and its attachments), or one per document family by file name, with a bookmark for each document.

PRO Command line: combine-pdfs Version 1.0
A Pro toolIn the free edition it works on up to 25 documents per run, so you can try it on real work. Compare Free and Pro.

Combine PDFs joins PDFs into combined files written to the run's files folder. It can make one file from every PDF in the input, one file per folder, or one file per family, where a family is a parent such as ABC0001.pdf and the files whose names start with it, such as ABC0001_1.pdf or ABC0001.0001.pdf.

Documents are added in natural name order, so doc2 comes before doc10; in a family the parent always comes first. By default each document gets a bookmark (its file name) at its first page, with the document's own bookmarks underneath. Links are kept only when they lead to a page in the same document. Each combined file is checked after it is built to make sure it holds exactly the expected pages; if it does not, it is not written.

Use it when

How to run it

  1. Choose the folder of PDFs as Input and an Output folder outside it. Only .pdf files are used.
  2. Choose Combine: All, PerFolder or ByName.
  3. For All, type the Combined file name.
  4. Leave Bookmark each document on unless the combined file should have no bookmarks.
  5. Decide on Leave out unreadable PDFs (see below).
  6. Click Run, read the notes, then click Open report to see where each document landed.

Settings

Every setting has the same help beside it in the app. On the command line, pass each as --name value; ltk help combine-pdfs lists them.

Settings

SettingWhat it doesType and default
Combine
--mode
All: every PDF into one. PerFolder: one PDF per folder. ByName: one PDF per family, where a file joins the one whose name it starts with, followed by _ . - or a space (ABC0001.pdf with ABC0001_1.pdf).
PerFolder names each combined file after its folder and puts it in that folder's parent: mail\email1\ becomes mail\email1.pdf. PDFs at the top of the input go into _top level.pdf. ByName works within each folder: a file joins the shortest name it starts with, when the next character is _, ., - or a space. ABC00010.pdf does not join ABC0001.pdf, because no separator follows. Each family file is named after its parent.
choice: All, PerFolder, ByName
All
Combined file name
--name
Name of the combined PDF when combining all.
.pdf is added if you leave it off. If the name is empty the run stops before it starts.
Shown when mode = All
text
Combined
Bookmark each document
--bookmarks
Add a bookmark for each PDF (its file name) at its first page, with its own bookmarks under it.
The document's own bookmarks are copied under its entry and point to the right pages in the combined file.
yes/no
true
Leave out unreadable PDFs
--skip-unreadable
Off (default): if any PDF of a combined file cannot be read (damaged or password-protected), that combined file is not written. On: it is written without them, and they are reported.
A PDF is unreadable if it is damaged or password-protected. Off (default): the whole combined file it belongs to is not written, and every document in it is reported as Not written. On: the combined file is written without it, and it is reported as Not included. If no PDF in a group can be read, nothing is written either way.
yes/no
false

Common settings

SettingWhat it doesType and default
Input required
--input
Folder (or single file) to read. It is opened read-only and never modified. folder
empty
Output required
--output
Folder for reports. Must not be inside the input folder. Each run gets its own sub-folder. folder
empty
Recurse
--recurse
Include sub-folders. yes/no
true
Extensions
--extensions
Only process these extensions (e.g. .pdf, .docx). Empty means the tool's default set. list
empty
Parallelism
--parallelism
Files processed at once. Use 1-2 for spinning disks or network shares. number
4

What you get

Each run creates its own folder inside the output folder, with the report combine-pdfs.csv, errors.csv and manifest.json (see Run folders and manifests).

Report columns

Check the result

Tips
  • Order follows file names, not dates. In PerFolder mode attachment.pdf sorts before message.pdf; if the email must come first, rename the files or use ByName with family names.
  • Use FirstPage and LastPage from the report to cite where each document sits in the combined file.
  • If documents contain fillable forms, run Flatten PDFs first: form fields in the combined file are not interactive.
Watch out for
  • Password-protected PDFs cannot be combined. Remove the password first (for example with Decrypt) if you are entitled to.
  • Combine PDFs is a Pro tool. The free edition combines up to 25 documents per run.

From the command line

The command line is part of LitTechKit Pro. See Command line.

ltk run combine-pdfs --input "D:\Matter\Production\PDF" --output "D:\Matter\Work" --mode ByName

Related tools