---
name: Merge To PDF
slug: merge-to-pdf
category: Automation
description: Merge To PDF combines multiple PDF files into a single PDF. Use it when you need to join separate PDFs or respond to requests for PDF merging and concatenation.
github: "https://github.com/CoderWanFeng/python-office/tree/develop/skills/pdf/merge2pdf"
language: Python
stars: 1339
forks: 301
install: "npx degit https://github.com/CoderWanFeng/python-office/tree/develop/skills/pdf/merge2pdf ~/.claude/skills/merge2pdf"
installs_to: ~/.claude/skills/merge2pdf
source_path: skills/pdf/merge2pdf/SKILL.md
collection_size: 50
category_size: 1523
collection_url: "https://dirskills.com/collections/CoderWanFeng/python-office"
added: 2026-08-12T04:43:08.538Z
last_synced: 2026-08-12T04:43:08.538Z
canonical_url: "https://dirskills.com/skills/merge-to-pdf"
---

# Merge To PDF

Merge To PDF combines multiple PDF files into a single PDF. Use it when you need to join separate PDFs or respond to requests for PDF merging and concatenation.

**Install:**

```bash
npx degit https://github.com/CoderWanFeng/python-office/tree/develop/skills/pdf/merge2pdf ~/.claude/skills/merge2pdf
```

## README

# merge2pdf Skill

> 合并多个 PDF 文件

## 功能描述

将多个 PDF 文件合并为一个 PDF 文件。

## 所属分类

`office/skills/pdf/merge2pdf/`

## 调用方式

```python
from skills.pdf import merge2pdf

merge2pdf(
    input_file_list=['./1.pdf', './2.pdf', './3.pdf'],
    output_file='./merged.pdf'
)
```

## 参数说明

| 参数 | 类型 | 必填 | 默认值 | 说明 |
|------|------|------|--------|------|
| `input_file_list` | list | 否 | - | PDF 文件路径列表 |
| `output_file` | str | 否 | - | 合并后的 PDF 文件路径 |
| `one_by_one` | list | 否 | - | **[已弃用]** 请使用 `input_file_list` |
| `output` | str | 否 | - | **[已弃用]** 请使用 `output_file` |

## 返回值

`None`

## 使用示例

```python
from skills.pdf import merge2pdf
merge2pdf(
    input_file_list=['./part1.pdf', './part2.pdf'],
    output_file='./all.pdf'
)
```

## 视频教程

https://www.python4office.cn/python-office/popdf/%E8%AF%BE%E7%A8%8B/8-merge2pdf

## 原始函数

`office.api.pdf.merge2pdf`
