Merging large PDF files is very quick and easy using PDF.co Web API this tool can merge multiple PDF files into a single PDF. The web app is browser-based and it works for all operating systems. Our servers in the cloud will handle the pdf creation for you once you have merged your files. So, it won’t drain any capacity from your computer and all the files you uploaded, as well as the file generated on our server, will be deleted permanently within an hour. Using JavaScript and PDF.co Web API will allow you to quickly merged large files into a single PDF document.
Here’s a tutorial on how to merge large files in JavaScript(node.js) using PDF.co Web API. We will show you a simple step-by-step guide to do this task. So, let’s begin!
- Open Visual Studio Code
- Set up JavaScript Code
- Run JavaScript Code
- Run the Program Result
- Merged PDF Files Output
- Demo
We will use these sample PDF documents and merge them into a single PDF.

Follow this easy step-by-step tutorial to merge large PDF files.
Step 1: Open Visual Studio Code
- First, open the Visual Studio Code editor. You can also use your favorite editor in JavaScript.
- Next, add the JavaScript Merge PDF sample code. You can get the sample code at this link.
Step 2: Set up JavaScript Code
Let’s set up the code
- In line 26, add your PDF.co API Key. You can get the API Key in your PDF.co dashboard. If you don’t have an account, kindly sign up at this link.
- In lines 30 and 31, input the sample PDF file names. You can download the sample files at this link.
- In line 34, enter your preferred output file name.
Step 3: Run JavaScript Code
- After setting up the code, let’s run the program. In your terminal, type
node your_program_name.js
to see the result.
Step 4: Run the Program Result
- Once the program was running successfully, go to your JavaScript program folder to view the output.
Step 5: Merge PDF Files Output
- Here’s the merged PDF document output.

Step 6: Demo
- Merge PDF Files demo using PDF.co and JavaScript(node.js).

In this tutorial, you learned how to merge large PDF files using JavaScript(node.js). You also learned how to use the PDF.co Web API to merge PDF documents into a single PDF.