Skip to content
  • App
  • Make
  • n8n

How to merge PDF files

To merge PDF files, use the 1001fx function mergepdfs – in Make, n8n or the 1001fx app. It takes two or three PDF files and returns one PDF in which every page keeps its orientation.

The fields

The same in the 1001fx app, Make and n8n. mergepdfs costs 3 credits per call.

file1
– The first PDF from the previous step.
file2
– The PDF that is appended after the first one.
file3
– Optional third PDF, appended at the end.

All parameters and examples: mergepdfs reference.

Example

What you send to mergepdfs and what comes back – the same in every tool.

Merge 3

Merges 3 pdfs

Input

Expects 3 pdf files named as file parameter: files
{
  "files": [
    {
      "name": "file.pdf",
      "type": "",
      "path": "testdata/file.pdf"
    },
    {
      "name": "pdf-landscape.pdf",
      "type": "",
      "path": "testdata/pdf-landscape.pdf"
    },
    {
      "name": "file.pdf",
      "type": "",
      "path": "testdata/file.pdf"
    }
  ]
}

Output · HTTP 200

Result is a single file.
{
  "statusCode": 200,
  "headers": {
    "content-type": "application/pdf",
    "content-disposition": "attachment; filename=\"result.pdf\""
  }
}
Show curl command
curl -X POST 'https://api.1001fx.com/files/mergepdfs' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -F 'file1=@file.pdf' \
  -F 'file2=@pdf-landscape.pdf' \
  -F 'file3=@file.pdf'

In the 1001fx app

Without a scenario or workflow: run the function in your browser for a one-off task, or to try the fields before you build the automation.

mergepdfs in the 1001fx app: the form with example values
Merge PDFs in the 1001fx app
  1. 1

    Open the function

    Log in to the 1001fx app and open Functions → Merge PDFs.

  2. 2

    Fill the fields

    Fill the fields as described above. Files can be uploaded from your computer.

  3. 3

    Run it

    Click Run. The answer appears next to the form; files come as a download. Each run is charged like an API call.

  4. 4

    Reuse the call

    The same page shows the call as cURL command, ready for scripts and other tools.

In Make

  1. 1

    Start the scenario

    Start with the modules that deliver the PDF files, for example Google Drive "Watch files in a folder" followed by "Download a file" for each PDF.

  2. 2

    Add the 1001fx module

    Add a module, search for 1001fx and pick “Merge PDFs”. Select your 1001fx connection or create one with your API key.

  3. 3

    Fill the fields

    Fill the fields as described above, mapped from the previous steps.

  4. 4

    Use the result

    The module returns the merged PDF as a file. Upload it with Google Drive "Upload a file" or attach it to an email.

Connecting 1001fx: 1001fx for Make.

In n8n

  1. 1

    Start the workflow

    Start with the nodes that deliver the PDF files, for example a Google Drive Trigger node that watches a folder, followed by a Google Drive node that downloads each PDF.

  2. 2

    Add the 1001fx node

    Add a node, search for 1001fx and pick “Merge PDFs”. Select your 1001fx credential or create one with your API key.

  3. 3

    Fill the fields

    Fill the fields as described above, mapped from the previous steps.

  4. 4

    Use the result

    The node returns the merged PDF as a file. Upload it with a Google Drive node or attach it to a Send Email node.

Connecting 1001fx: 1001fx for n8n.

Tips

  • To merge more than three PDFs, merge the first ones and then merge the result with the next files in a second call.
  • Use removepdfpages or insertpdfpages if you need only some pages of a file.

Frequently asked questions

How many PDFs can I merge in one call?
Up to three: file1 and file2 are required, file3 is optional. For more files, merge the result again with the next ones.
Are landscape pages kept?
Yes. Every page keeps its orientation, so landscape and portrait pages can be mixed in the merged PDF.
Ask 1001fx