360 Secure SkillHub
360 安全技能中心

PDF小册子合并排版

将指定目录中的 PDF 按自然文件名顺序合并为源文件,补齐页数到 4 的倍数并按骑马钉顺序重排,生成每张横向双面 2-up 的书册排版 PDF,并给出横向、双面、短边翻转的打印设置建议。

ninjahwdragon
ninjahwdragon
热度 45.79
最近更新 2026-05-11 17:42:10
分类:效率依赖:代码执行 / 读写文件应用场景:文件转换 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add pdf-booklet-print-merge
Metadata
name
pdf-booklet-print-merge
description
Merge PDF files and create booklet-ready 2-up duplex output for saddle-stitch printing. Use for PDF merge, booklet imposition, short-edge duplex, center-fold reading, 小册子打印, 对折中缝翻页.
argument-hint
--input-dir data/input --output data/output/booklet_print.pdf --merged-output data/output/merged_source.pdf
user-invocable
true
disable-model-invocation
false

PDF Booklet Print Merge

When To Use

  • You need to merge multiple PDF files into one source file.
  • You need a booklet print layout (2 pages per sheet, landscape, duplex).
  • You want pages reordered for saddle stitch so the booklet can be folded at the center.
  • You need Chinese-friendly use cases like 小册子打印, 双面打印, 中缝翻页, 对折阅读.

Inputs

  • --input-dir: source folder containing PDF files.
  • --output: booklet-imposed output path.
  • --merged-output: sequential merged output path (optional).
  • --no-merged-output: skip sequential merged output.

Procedure

  1. Validate that the input directory exists and contains at least one PDF.
  2. Sort PDF files by natural filename order.
  3. Merge all pages sequentially into a source sequence.
  4. Pad page count to a multiple of 4 with blanks for booklet signatures.
  5. Reorder pages into saddle-stitch sheet order.
  6. Place left/right pages on a single landscape sheet (2-up layout).
  7. Write booklet output and optional merged source output.
  8. Return print settings guidance: landscape + duplex + short-edge flip.

Run Script

Run booklet_merge.py with your arguments.

Example:

/usr/bin/python3 ./.claude/skills/pdf-booklet-print-merge/scripts/booklet_merge.py --input-dir data/input

References