How to Merge PDF Files Using Our API – Design Update
The PDF.co PDF Merger API can merge a mix of different document formats into a single PDF. This API function can save you time and effort by taking away the hassle of converting the non-PDF to PDF before they can be merged.
Following are the supported document formats in PDF Merger:
Our PDF.co Web API engine supports different document formats. You can mix and merge different file formats in one go. The supported formats are listed in the table above.
Merge Large Files
The PDF Merger API can process large files using the async parameter.
PDF Format as Output
The PDF Merger API output format is in PDF. When images or other non-PDF files are merged using the /v1/pdf/merge2 endpoint the output format is in PDF as well.
Web API Supports Multiple Languages
PDF.co platform can be used by software developers from programming languages such as PHP, Javascript, .NET and ASP.NET, C#, Java, Visual Basic, and many others. Find source code samples in our API documentation.
As mentioned above, there are 2 PDF Merger endpoints. Because of the difference in file support, we will show different source code samples for each endpoint.
To demonstrate the /v1/pdf/merge2 endpoint, we will use these five (5) sample documents with different file formats. There’s a PDF file, a Word document, a Spreadsheet, a JPG, and a PNG.
Screenshots of PDF Merger 2 Source Files With Different Formats
Once the request has been processed. All the documents will be merged into a single PDF.
Screenshots of PDF Merger 2 Output PDF
Now let’s take a quick look at the /v1/pdf/merge2 endpoint’s parameters and their uses.
Endpoint
URL:
https://api.pdf.co/v1/pdf/merge2
Method:
POST
Parameter
Description
url
required. Comma-separated links to source files.
encrypt
optional. Enable encryption for the output file: true or false
async
optional. Runs processing asynchronously. Returns jobId to use with job/check: true or false
name
optional. Output file name.
profiles
optional. Must be a String. Set custom configuration. See profiles examples here
This sample code and other cURL source code samples are available here.
Let’s see the PDF Merge 2 in action using cURL.
Call /v1/pdf/merge2 Endpoint Using cURL
The PDF Merge2 JavaScript source code samples are available here.
The PDF Merge2 PHP source code samples are available here.
The sample code for PDF Merge2 in Python is here.
The PDF Merge2 Java source code samples are available here.
The PDF Merge2 C# source code samples are available here.SIGN UP FOR FREE
PDF Merge Endpoint
The /v1/pdf/merge has the same function as PDF Merge 2 except that the file support for this endpoint is exclusively in PDF format. If all of your source files are in PDF format, we recommend that you use this endpoint, otherwise, the /v1/pdf/merge2 endpoint would work best for you.
To demonstrate /v1/pdf/merge, we will use these two (2) PDF files and merge them into a single file.
Screenshots of Two PDF Files to Merge
When PDF.co process the request successfully, the output file will look like this.
Screenshot of Merged PDF Output File
Let’s quickly go over the /v1/pdf/merge endpoint’s parameters and their uses.
Endpoint
URL:
https://api.pdf.co/v1/pdf/merge
Method:
POST
Parameter
Description
url
required. Comma-separated links to source files.
encrypt
optional. Enable encryption for the output file: true or false
async
optional. Runs processing asynchronously. Returns jobId to use with job/check: true or false
name
optional. Output file name.
profiles
optional. Must be a String. Set custom configuration. See profiles examples here
PDF Merge cURL source code samples are available in our repository here.
Let’s see the PDF Merge in action using cURL.
Calling /v1/pdf/merge Endpoint using cURL
PDF Merge JavaScript code snippets are available in our repository here.
PDF Merge PHP code snippets are available in our repository here.
The sample code for PDF Merge in Python is here.
PDF Merge Java code snippets are available in our repository here.
PDF Merge C# code snippets are available in our repository here.SIGN UP FOR FREE
Why Use PDF File Merger API
Merge Large Files
You can merge large files easily in a matter of seconds. Most PDF merging API will do it much slower, if you open two or more large PDF files, and try to merge them. Our API allows you to select large files and merge them automatically.
Choose Pages to Merge
Our API allows you to select the individual pages or a range of pages you want to be included in the merged PDF. You can also choose to merge entire PDF documents. Overall, that gives you greater flexibility on how you merge your PDFs.
Our PDF merger API is legit and safe to use because we do not store any of your data online. Furthermore, the API encrypts the transmission of PDF data, which protects it from hackers. You can therefore use it to merge sensitivity data with total peace of mind.
Can I integrate PDF.co Merger API?
We created several integrations of our API and powerful business automation platforms. These integrations include Zapier and Integromat plugins, UiPath, and BluePrism extensions, but we have 300+ more integrations ready. You can easily connect with the most popular applications through our PDF.co API integrations.
Is Combine PDF Safe?
Yes, it is safe to combine PDF files using our PDF merge API. You have an option to delete the files after the merging is complete. If you do not delete them, our API will delete them automatically after about two hours.
The PDF.co API runs in a secure AWS Infrastructure. All files and documents processed by PDF.co are encrypted. For more information on PDF.co security check out https://pdf.co/security
How Do I Merge PDF Files Automatically?
Our PDF merger API can help you to merge PDF files automatically. You can choose to have it automatically merge your PDFs online, or from your local server.
Source Code Samples for PDF Merge
We also have PDF merge code samples, which you can use to create your own when using our API. Feel free to contact us if you need help using our PDF Merger API.
SIGN UP FOR FREE