Merge PDFs

Merge PDFs

Merge PDFs is a REST API tool that joins together any number of full PDF files or specified pages from separate documents into a consolidated PDF.

Build Your Solution

You have document processing problems, we have Solutions. Explore the many ways pdfRest can align your documents with your business objectives.

Browse all solutions
Many different file type icons (XLS, PNG, HTML, etc) are all marging with arrows into a large PDF file icon

Convert and Merge Multiple Types of Files Together

Access PDF Processing Power with AI Magic

Access PDF Processing Power with AI Magic

The pdfRest logo is added to the Microsoft Power Automate logo with a representation of a PNG to PDF conversion workflow

Integrate pdfRest with Microsoft Power Automate

The Salesforce logo with APEX programming language is connected with the pdfRest logo around a PDF toolkit icon

Integrate PDF API Tools with Salesforce Apex Code

Control your Backend with pdfRest API Toolkit Self-Hosted

Control your Backend with pdfRest API Toolkit Self-Hosted

Three different PDF documents are added together to equal a new document where they are combined

Merge PDF Documents for Streamlined Report Compilation

Why is pdfRest the best API to merge PDF files?

pdfRest offers the best solution for merging multiple PDF documents together, because it produces optimized output, supports flexible page ranges, and can be combined with conversion to merge files of other formats.

Merge without the Bloat

Many tools claim to merge PDF documents together, but most leave the resulting file with unnecessary, redundant content we like to refer to as “bloat.” This can make the file size much bigger than it needs to be and create a much slower user experience for file transfers and viewing.

pdfRest optimizes the content of every merged PDF it creates to ensure the output file contains only what it needs.

Assemble your Perfect Document

pdfRest’s Merge PDFs allows for much more than full document merging. Let’s say you only need page 1 from Document A, pages 3-5 from Document B, and pages 15, 18, and 72 from Document C… no problem! Choose exactly which pages to include from each input file and specify the exact order you need them in the output file.

Level Up with Chainable API Calls

Sometimes you need to merge PDFs together, but other times you may need to merge various file types together into one PDF, such as Word documents with PNG images and HTML files.

pdfRest is purpose-built to support multi-step workflow processes. Simply upload your files of various type to the Convert to PDF tool and pass the resource IDs of each output file from those calls to the Merge PDFs tool. No need to download and upload files between API Calls - simply chain calls together.

Start from Code Examples

See more code examples in our GitHub repository

Customize Your Solution

Learn about the parameters for this tool to create your custom solution.

Pages

The pages[] parameter is used to identify pages and/or page ranges that you would like to take from each input document and merge into a single PDF. This is a versatile parameter that allows you to reorder and duplicate pages based on the page numbers and ranges that you specify. Use this parameter once for each file that you would like to merge.

If a page number is included more than once (e.g., “1,2,3,3,4,5”), then the page will be duplicated in the output file. Pages may also be reordered (e.g., “1,5,3,2,4”), and page ranges may be reversed by listing the higher page number first (e.g., “2,4,9-5,12”).

To include all pages from a document, use the range “1-last”. The “last” keyword can also be applied generally to page ranges (e.g., “1-4,6,7-last”).

The pages[] parameter also accepts the keywords “even” and “odd” to select only those pages to merge into your new PDF.

Generate a self-service API Key now!

Create your FREE API Key to start processing PDFs in seconds, only possible with pdfRest.