Combine all PDF files in a directory into 1 PDF file

Usage no npm install needed!

<script type="module">
  import pdf from 'https://cdn.skypack.dev/1pdf';



Combine all PDF files in a directory 📂 into 1 PDF file


Watch 1pdf video demo on Youtube

1pdf in action:
1pdf in action

1pdf usage demo:
1pdf usage demo

1pdf efficiency statistics:
1pdf efficiency statistics


I wanted to combine my lecture slides (several PDF files every week) into one PDF file, so that I can read, search, go back and forth while opening just one PDF file. 🤓

I used "https://combinepdf.com" at first, but it took me so long. 😴
Most of that time was spent on uploading and downloading the PDF files, not the actual process of combining the PDF files. 😞

What if I can combine PDF files locally? That means no more time wasted on uploading and downloading the PDF files! 😎 ...

Getting Started

Install the '1pdf' package globally using npm

npm i -g 1pdf

when you do not have write access to /usr/local/lib/node_modules, run

sudo npm i -g 1pdf

enter password when prompted and hit enter/return


Step 1. cd into a directory containing PDF files to be combined

Step 2. (Optional) Rename the PDF files in your desired order

Step 3. Run


to combine the PDF files into one PDF file



1pdf myFileName.pdf

to name the output PDF file at the same time

Package Structure

|-- README.md
|-- bin
|   `-- combine
|-- combine_pdf_files.js
|-- package-lock.json
`-- package.json


  • Yifan Ai - Initial work

See also the list of contributors who participated in this project.


This project is licensed under the MIT License