# Merge them into one PDF

> Merges the run's PDFs into a single PDF.

Source: https://docs.go-lumen.ai/reference/steps/merge-pdfs

## At a glance

| Property | Value |
| --- | --- |
| **Step name** | `merge-pdfs` |
| **Resource** | ClusterStep (`lumen.ai/v1alpha1`) |
| **Palette group, category** | files, files |
| **Credits** | **3** credits each time it succeeds |
| **Side effects** | no |
| **Installation must provide** | nothing |

## Inputs

| Property | Value |
| --- | --- |
| **Needs** | `file` |
| **Produces** | `file` |
| **Works on** | batch: all of a run's documents together |

Needs and Produces are data types (file, text, fields, email). The editor offers a step only where what it needs is already on the path. See [Documents and data](https://docs.go-lumen.ai/concepts/how-flows-run.md#documents-and-data).

## Outputs

No named outputs. Later nodes still see everything produced earlier on the path, and this step passes the documents on unchanged.

## Settings

Set under `config:` on the flow node. Text settings may contain `{nodeId.field}` placeholders.

| Setting | Type | Default | Description |
| --- | --- | --- | --- |
| `name` | string |  | Name is the merged file's name; merged.pdf when unset. (minLength 1) |

The full JSON Schema of these settings: [merge-pdfs.schema.json](https://docs.go-lumen.ai/schemas/steps/merge-pdfs.schema.json).

## Example

Merge two supplier invoices into one file

```yaml title="config"
name: october-invoices.pdf
```

## Use it in a flow

A node that runs `merge-pdfs` goes under `spec.nodes` of a [Flow](https://docs.go-lumen.ai/concepts/how-flows-run.md#the-flow-as-yaml). Give it any id, and list the next node ids in next.

```yaml title="flow.yaml"
apiVersion: lumen.ai/v1alpha1
kind: Flow
metadata:
  name: merge-pdfs-example
  namespace: tenant-acme
spec:
  displayName: "Merge them into one PDF"
  triggers:
    - id: start
      ref: {name: manual-run}
      next: [merge-pdfs]
  nodes:
    - id: merge-pdfs
      stepRef: {name: merge-pdfs}
      config:
        name: october-invoices.pdf
```
