用 macOS 隐藏的 join 工具合并 PDF

在终端里调用系统自带的 Automator 合并 PDF 动作,把多个 PDF 合成一个文件。

macOS文件自动化PDF低风险
运行 "/System/Library/Automator/Combine PDF Pages.action/Contents/MacOS/join" -o 合并.pdf a.pdf b.pdf,无需第三方软件即可合并 PDF。

01命令

命令
$ "/System/Library/Automator/Combine PDF Pages.action/Contents/MacOS/join" -o merged.pdf page1.pdf page2.pdf page3.pdf

02作用说明

每台 Mac 都内置了 Automator 的“合并 PDF 页面”动作,它的命令行程序 join 可以直接在终端调用。用 -o 指定输出文件,后面按合并顺序列出输入的 PDF。用 *.pdf 这类通配符就能一次性合并整个文件夹里的扫描页。

03风险

风险低风险
!注意: 某些 macOS 版本里程序位于 .../Combine PDF Pages.action/Contents/Resources/join.py;路径里有空格,整条路径必须加引号。

04撤销

✓无需撤销——该命令不会改变持久状态。

05来源

  • Combine PDF files in Preview on Mac
    Apple · vendor-doc · 2026-09-17
    依据: Documents Apple's built-in PDF merging capability in Preview, which the Automator 'Combine PDF Pages' action uses under the hood.

最后验证: 2026-09-18 · 分类: 媒体

06相关方案