用系统自带的 join 工具合并 PDF
利用 macOS 隐藏的 Automator「合并 PDF 页面」程序,一条命令拼接多个 PDF。
运行 Combine PDF Pages.action 里的 join 工具,用 -o 指定输出文件,后面跟要合并的 PDF。
01命令
命令
$ "/System/Library/Automator/Combine PDF Pages.action/Contents/MacOS/join" -o ~/Desktop/merged.pdf file1.pdf file2.pdf02作用说明
macOS 多年来一直内置 PDF 合并工具,只是藏在 Automator 动作里。完整路径含空格,必须加引号。输入文件按列出的顺序合并。工具静默运行,完成后生成 merged.pdf。
03风险
!注意: 系统更新可能改变路径,先用 ls 确认;加密 PDF 没有密码无法合并。
04撤销
✓无需撤销——该命令不会改变持久状态。
05来源
- find – Walk a file hierarchy依据: The join binary inside the Automator action uses CoreGraphics via Python to concatenate PDFs; verify it exists with ls "/System/Library/Automator/Combine PDF Pages.action/Contents/MacOS/".
- Preview a file with Quick Look on Mac依据: Apple ships PDF merging as an Automator action; the join tool is the same engine exposed to the shell.
最后验证: 2026-09-18 · 分类: 文件与文件夹