Merge PDFs
Combine PDF files into one document in resolved input order.
No installation needed
Use this tool in your browser. The merge runs entirely in the page, so your PDFs never leave the browser tab.
Basic usage
consultchimps pdf merge "inputs/**/*.pdf" \
--output outputs/combined.pdfFiles discovered from paths, directories, and globs are deduplicated and sorted. Every page from the first resolved PDF is copied before the pages from the next.
Control the order explicitly
For a hand-curated pack, pass files in the desired naming order:
consultchimps pdf merge \
"pack/01-cover.pdf" \
"pack/02-summary.pdf" \
"pack/03-appendix.pdf" \
--output outputs/client-pack.pdfOrdering
Discovery produces a locale-sorted path list. Prefix filenames with 01-,
02-, and so on when the order carries meaning.
Output safety
- The destination directory is created when needed.
- Existing output is rejected unless
--forceis present. - An input file can never also be the output file.
- A missing or unreadable source produces a structured error.
consultchimps pdf merge pack/ \
--output outputs/client-pack.pdf \
--forceTypeScript API
import { mergePdfs } from "@consultchimps/pdf";
const result = await mergePdfs({
inputs: ["01-cover.pdf", "02-summary.pdf", "03-appendix.pdf"],
output: "outputs/client-pack.pdf",
});
console.log(result.metrics.pages);