How to Merge Two PDF Files in Node.JS

Working with large documents can be time-consuming and stressful. One bad keystroke can eliminate all of you work in an instant, and incorrect formatting may mean that your document looks pieced together and unprofessional. By merging your PDF documents together to create a larger document, you can minimize your time spent on the task and maximize the quality of the output. The following API will allow you to merge two or more PDF files into one, preserving the order of the input documents once combined.

You can use this API by running the following command to install the SDK:

npm install cloudmersive-convert-api-client --save

Or, you can add this snippet to your package.json:

"dependencies": {
"cloudmersive-convert-api-client": "^2.4.8"

Then, you can call the function:

var CloudmersiveConvertApiClient = require('cloudmersive-convert-api-client');
var defaultClient = CloudmersiveConvertApiClient.ApiClient.instance;

You can retrieve the API Key for this function at no cost and with no commitment on the Cloudmersive website. This will give you access to 800 monthly calls across our entire API library.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store