About this tool
This tool joins two or more PDFs into a single PDF. By default the files follow one after another in the order you added them, and you can sort them by file name instead. You can also mix their pages in turns, taking a set number of pages from each file in each round, and insert a blank page between files.
For example, you have an invoice and three receipts as separate PDFs and want to send them as one file.
How to use it
- Choose this tool.
- Add two or more PDFs, with Upload or by dragging them in.
- Choose the order: as added, sorted by name, or mixed page by page.
- If you like, turn on a blank page between files.
- Press Generate, then download the merged PDF.
What you get back
You get one new PDF containing all your files. You can download it.
TEST IT LIVE
Try Merge PDFs in the Studio
One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Family
PDFs
Plan
Free
Method
POST
Endpoint
/v1/pdfs/merge
Tool ID
pdfs.merge
Authentication
API key
Accepts
PDF
Background jobs
Yes
Usage group
Pdf
For developers
Use it from your code
cURL
curl -X POST "https://app.h2i.davixlabs.io/v1/pdfs/merge" \
-H "X-Api-Key: $DAVIX_H2I_API_KEY" \
-F 'files=@document.pdf' \
-F 'mode=concatenate' \
-F 'collateSize=1' \
-F 'response=url'Node.js
const { DavixH2I } = require('@davixlabs/h2i-sdk');
const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.pdfs.merge({
"files": 'document.pdf',
"mode": "concatenate",
"collateSize": 1,
"response": "url"
});
console.log(result.data, result.requestId);PHP
<?php
require 'vendor/autoload.php';
$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->pdfs()->merge([
'files' => 'document.pdf',
'mode' => 'concatenate',
'collateSize' => 1,
'response' => 'url',
]);
echo $result->requestId;More in PDFs
