- Open Visual Studio Code
- Run the Program Result
- Merged PDF Files Output
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
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.
- After setting up the code, let’s run the program. In your terminal, type
node your_program_name.jsto see the result.
Step 4: Run the Program Result
Step 5: Merge PDF Files Output
- Here’s the merged PDF document output.
Step 6: Demo